From ae3308bb0243603f2eae8590c26ebc57670b67b9 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Tue, 21 May 2024 02:16:41 -0300 Subject: [PATCH 1/2] Use updated silkworm with the new block-extra-data storage --- external/silkworm | 2 +- src/block_conversion_plugin.cpp | 6 +++--- tests/nodeos_eos_evm_server.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/external/silkworm b/external/silkworm index c524bbd..34f64cc 160000 --- a/external/silkworm +++ b/external/silkworm @@ -1 +1 @@ -Subproject commit c524bbde67c99812bbf8ba46e27eeec638b7815e +Subproject commit 34f64ccdbd5ec87fd8deb12bffc4d78decbf3854 diff --git a/src/block_conversion_plugin.cpp b/src/block_conversion_plugin.cpp index f9f146f..cd47972 100644 --- a/src/block_conversion_plugin.cpp +++ b/src/block_conversion_plugin.cpp @@ -129,7 +129,7 @@ class block_conversion_plugin_impl : std::enable_shared_from_this auto& { return arg.gas_parameter.gas_sset; }, new_config), } }; - curr.consensus_parameter_index = consensus_param.hash(); + curr.set_consensus_parameter_index(consensus_param.hash()); - silkworm::db::update_consensus_parameters(appbase::app().get_plugin().get_tx(), *curr.consensus_parameter_index, consensus_param); + silkworm::db::update_consensus_parameters(appbase::app().get_plugin().get_tx(), *curr.get_consensus_parameter_index(), consensus_param); } for_each_action(*new_block, [this, &curr, &block_version](const auto& act){ diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index 0c1aa61..bd63b4a 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -232,7 +232,7 @@ cmd="set account permission eosio.evm active --add-code -p eosio.evm@active" prodNode.processCleosCmd(cmd, cmd, silentErrors=True, returnType=ReturnType.raw) - trans = prodNode.pushMessage(evmAcc.name, "init", '{"chainid":15555, "fee_params": {"gas_price": "150000000000", "miner_cut": 10000, "ingress_bridge_fee": null}}', '-p eosio.evm') + trans = prodNode.pushMessage(evmAcc.name, "init", '{"chainid":15555, "fee_params": {"gas_price": "150000000000", "miner_cut": 10000, "ingress_bridge_fee": "0.0001 EOS"}}', '-p eosio.evm') prodNode.waitForTransBlockIfNeeded(trans[1], True) From 4020a499752192337ceffcd1e14f12c903506eda Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Thu, 23 May 2024 21:33:41 -0300 Subject: [PATCH 2/2] Don't create extra_block_data when consensus_parameter_index is empty --- external/silkworm | 2 +- src/block_conversion_plugin.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/external/silkworm b/external/silkworm index 34f64cc..6325c33 160000 --- a/external/silkworm +++ b/external/silkworm @@ -1 +1 @@ -Subproject commit 34f64ccdbd5ec87fd8deb12bffc4d78decbf3854 +Subproject commit 6325c33324f4f15d3519d1f71d0f0eed4f52eb1e diff --git a/src/block_conversion_plugin.cpp b/src/block_conversion_plugin.cpp index cd47972..e7dd014 100644 --- a/src/block_conversion_plugin.cpp +++ b/src/block_conversion_plugin.cpp @@ -129,7 +129,10 @@ class block_conversion_plugin_impl : std::enable_shared_from_this