-
Notifications
You must be signed in to change notification settings - Fork 696
[Mel] - Create MEL validator #4152
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
base: raul/mel-inbox-reading
Are you sure you want to change the base?
[Mel] - Create MEL validator #4152
Conversation
Message extraction function works with logs instead of receipts
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## raul/mel-inbox-reading #4152 +/- ##
==========================================================
- Coverage 29.29% 29.15% -0.14%
==========================================================
Files 457 460 +3
Lines 55861 56013 +152
==========================================================
- Hits 16362 16331 -31
- Misses 36542 36713 +171
- Partials 2957 2969 +12 |
❌ 799 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
|
|
||
| func (mv *MELValidator) Start(ctx context.Context) { | ||
| mv.CallIteratively(func(ctx context.Context) time.Duration { | ||
| latestStaked, err := mv.rollup.LatestStakedAssertion(&bind.CallOpts{}, mv.boldStakerAddr) |
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 will only work if the current node's mv.boldStakerAddress is the one that is staked on the chain (needs $10 million USD). We should instead fetch the latest assertion we locally agree with. I think we need to expose a helper method for this, and I can do this once I return from holiday
| if state.Hash() != wantState.Hash() { | ||
| return nil, fmt.Errorf("calculated MEL state hash in recording mode doesn't match the one computed in native mode, parentchainBlocknumber: %d", i) | ||
| } | ||
| if state.MsgCount >= toValidateMsgExtractionCount { |
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.
Very nice!
| melValidator := staker.NewMELValidator(builder.L2.ConsensusNode.ArbDB, builder.L1.Client, builder.L2.ConsensusNode.MessageExtractor, blobReaderRegistry) | ||
| extractedMsgCount, err := builder.L2.ConsensusNode.TxStreamer.GetMessageCount() | ||
| Require(t, err) | ||
| entry, err := melValidator.CreateNextValidationEntry(ctx, startBlock, uint64(extractedMsgCount)) |
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.
To test out multiple validations, we'll probably need to setup assertion posting...I can also help with this once Im back
No description provided.