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 6 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
6 changes: 6 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ jobs:
mkdir test_run_root
cd test_run_root
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}

- name: Test Leap Integration - different gas token
run: |
mkdir -p test_run_root
cd test_run_root
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_different_token_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}

- name: Test Web-Socket Integration
run: |
Expand Down
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
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ configure_file(nodeos_eos_evm_ws_test_basic.py . COPYONLY)
configure_file(nodeos_eos_evm_ws_test_fork.py . COPYONLY)
configure_file(nodeos_eos_evm_server.py . COPYONLY)
configure_file(nodeos_eos_evm_test.py . COPYONLY)
configure_file(nodeos_eos_evm_different_token_test.py . COPYONLY)
configure_file(nodeos_eos_evm_gasparam_fork_test.py . COPYONLY)
configure_file(defertest.wasm . COPYONLY)
configure_file(defertest.abi . COPYONLY)
Expand Down
Loading
Loading