Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0 -> main] Use updated silkworm with the new block-extra-data storage #226

Merged
merged 5 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/block_conversion_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class block_conversion_plugin_impl : std::enable_shared_from_this<block_conversi
new_block.header.parent_hash = last_evm_block.header.hash();
new_block.header.transactions_root = silkworm::kEmptyRoot;
// Note: can be null
new_block.consensus_parameter_index = last_evm_block.consensus_parameter_index;
auto cpi = last_evm_block.get_consensus_parameter_index();
if(cpi.has_value()) {
new_block.set_consensus_parameter_index(cpi);
}
return new_block;
}

Expand Down Expand Up @@ -293,9 +296,9 @@ class block_conversion_plugin_impl : std::enable_shared_from_this<block_conversi
.gas_sset = std::visit([](auto&& arg) -> 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<blockchain_plugin>().get_tx(), *curr.consensus_parameter_index, consensus_param);
silkworm::db::update_consensus_parameters(appbase::app().get_plugin<blockchain_plugin>().get_tx(), *curr.get_consensus_parameter_index(), consensus_param);
}

for_each_action(*new_block, [this, &curr, &block_version](const auto& act){
Expand Down
2 changes: 1 addition & 1 deletion tests/nodeos_eos_evm_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading