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

rpcdaemon: avoid copy of receipts and tx #2147

Merged
merged 3 commits into from
Jun 27, 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
2 changes: 1 addition & 1 deletion .github/workflows/rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
rm -rf ./mainnet/results/

# Run RPC integration test runner via http
python3 ./run_tests.py --continue --blockchain mainnet --jwt ${{runner.workspace}}/silkworm/build/cmd/jwt.hex --display-only-fail --port 8545 -x admin_,eth_mining,eth_getWork,eth_coinbase,eth_createAccessList/test_16.json,engine_,net_,web3_,txpool_,eth_submitWork,eth_submitHashrate,eth_protocolVersion,erigon_nodeInfo,debug_storageRangeAt/test_06.json,debug_storageRangeAt/test_07.json --transport_type http,websocket
python3 ./run_tests.py --continue --blockchain mainnet --jwt ${{runner.workspace}}/silkworm/build/cmd/jwt.hex --display-only-fail --port 8545 -x admin_,eth_mining,eth_getWork,eth_coinbase,eth_createAccessList/test_16.json,engine_,net_,web3_,txpool_,eth_submitWork,eth_submitHashrate,eth_protocolVersion,erigon_nodeInfo,debug_storageRangeAt/test_06.json,debug_storageRangeAt/test_07.json --transport_type http,websocket

# Capture test runner script exit status
test_exit_status=$?
Expand Down
4 changes: 2 additions & 2 deletions silkworm/rpc/core/receipts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Task<std::optional<Receipts>> read_receipts(db::kv::api::Transaction& tx, const
if (!raw_receipts || raw_receipts->empty()) {
co_return raw_receipts;
}
auto receipts = *raw_receipts;
auto receipts = std::move(*raw_receipts);

// Add derived fields to the receipts
auto transactions = block_with_hash.block.transactions;
auto& transactions = block_with_hash.block.transactions;
SILK_DEBUG << "#transactions=" << block_with_hash.block.transactions.size() << " #receipts=" << receipts.size();
if (transactions.size() != receipts.size()) {
throw std::runtime_error{"#transactions and #receipts do not match in read_receipts"};
Expand Down
Loading