-
I'm not sure if this is the right place to ask this question. But I'm running into an issue while running dev node deployment and testing. I've followed the tutorial here, to setup a dev node. I'm using following command to start a node, from reth source. RUST_LOG='debug,evm=trace,consensus::auto=trace,consensus::engine=trace' \
cargo run node --dev \
--chain ../../reth-local/genesis.json \
--datadir ../../reth-local/data/ \
--http.corsdomain "*" Here's my {
"nonce": "0x42",
"timestamp": "0x0",
"extraData": "0x5343",
"gasLimit": "0x1388",
"difficulty": "0x400000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0x2BB7DcEeB1964D1c2EdbCbB04Cd7893F6619d4c0": {
"balance": "1000000000000000000000000000"
},
"0xfCd9569Ab54097047D3b512510674826aaf444d6": {
"balance": "1000000000000000000000000000"
},
"0xaD777372eBde0e5E484362581D0aE962a17fc628": {
"balance": "1000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"config": {
"ethash": {},
"chainId": 1337,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"shanghaiTime": 0
}
} After the node has started, when I send a simple transfer transaction, it doesn't work.
The RETH runtime has following logs.
It shows a forkchoiceUpdate error:
To debug, I've added a trace log in the /// Fills in the post-execution header fields based on the given BundleState and gas used.
/// In doing this, the state root is calculated and the final header is returned.
pub(crate) fn complete_header<S: StateProviderFactory>(
&self,
mut header: Header,
bundle_state: &BundleStateWithReceipts,
client: &S,
gas_used: u64,
) -> Result<Header, BlockExecutionError> {
let receipts = bundle_state.receipts_by_block(header.number);
==> trace!(target: "consensus::auto", receipts=?bundle_state.receipts(), header=?&header, first_block=?&bundle_state.first_block(), "complete header receipts");
header.receipts_root = if receipts.is_empty() {
EMPTY_RECEIPTS
} else {
let receipts_with_bloom = receipts
.iter()
.map(|r| (*r).clone().expect("receipts have not been pruned").into())
.collect::<Vec<ReceiptWithBloom>>();
header.logs_bloom =
receipts_with_bloom.iter().fold(Bloom::ZERO, |bloom, r| bloom | r.bloom);
proofs::calculate_receipt_root(&receipts_with_bloom)
}; It shows following trace in the above log.
Even though the receipts contains relevant data for the produced block, it's not used while completing the header inside the pub(crate) fn build_and_execute(
...
// fill in the rest of the fields
let header = self.complete_header(header, &bundle_state, client, gas_used)?;
==> trace!(target: "consensus::auto", root=?header.state_root, ?body, ?header, "calculated root");
... It shows the calculated root inside the complete header to be an empty receipts root.
Hence it fails to validate the reciept root of the header vs the evm execution result. Is this a bug or I'm missing something. I'd appreciate if some can help me with this. I'm trying to implement a new consensus module, but figuring out the |
Beta Was this translation helpful? Give feedback.
@bbist This is fixed now. PR #5042