-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
experimental: MPT block witness for Erigon 3 #12847
Conversation
@antonis19 do we need #12783 then? |
@awskii nope, just closed that PR. |
return nil, err | ||
} | ||
|
||
var rejectedTxs []*RejectedTx | ||
includedTxs := make(types.Transactions, 0, block.Transactions().Len()) | ||
receipts := make(types.Receipts, 0, block.Transactions().Len()) | ||
noop := state.NewNoopWriter() | ||
// noop := state.NewNoopWriter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems not relevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is relevant because we are injecting a custom StateWriter. I just left the comment as a reminder of what code was before.
erigon-lib/kv/tables.go
Outdated
@@ -455,7 +459,7 @@ var ChaindataTables = []string{ | |||
ActiveValidatorIndicies, | |||
EffectiveBalancesDump, | |||
BalancesDump, | |||
|
|||
// Witnesses, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table should be initialised? Please add to comment of witness when values in that bucket become obsolete or so. also could be good to add it to some cleanup lists (to have other that rm chaindata options to reset contents of this bcket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table is not used for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove then all references pls
Experimental
eth_getWitness
RPC call implementation that computes the block witness for the MPT.This works roughly along the following lines:
This implementation is currently incomplete and still lacks support for the following cases which will be future work:
The code currently works correctly in 85% of the blocks of a small test chain of 161 blocks, for the unsupported cases mentioned above the RPC method will throw a root hash mismatch error.
I am proposing to merge the current PR even though the implementation is incomplete, so that we can incrementally add these features, and to avoid arduous merges or rebasing with main.