Skip to content

Unable to re-create receipts root only for block 22982400 #2231

Answered by karlb
sirpy asked this question in Help (Q&A)
Discussion options

You must be logged in to vote

When events are emitted by the block processing outside of user transaction (e.g. epoch rewards), then one "block receipt" is added to the block. This receipt can't be fetched with eth_getTransactionReceipt but with the Celo-specific eth_getBlockReceipt.

Combining these receipts makes the receiptsRoot match again:

import { ethers } from "ethers";
import { BaseTrie as Tree } from 'merkle-patricia-tree';
import { Receipt } from 'eth-object';
import { encode } from 'eth-util-lite';

const provider = new ethers.JsonRpcProvider('https://forno.celo.org');

const block = '0x' + (22982400).toString(16);
const rpcBlock = await provider.send('eth_getBlockByNumber', [block, false]);
const transactio…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by carterqw2
Comment options

You must be logged in to vote
3 replies
@sirpy
Comment options

@karlb
Comment options

@karlb
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2210 on January 24, 2024 08:40.