-
Notifications
You must be signed in to change notification settings - Fork 699
[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-tx-record
Are you sure you want to change the base?
[Mel] - Create MEL validator #4152
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## fetching-melobjectsfrom-preimages #4152 +/- ##
=====================================================================
- Coverage 28.90% 28.76% -0.15%
=====================================================================
Files 469 472 +3
Lines 56613 56883 +270
=====================================================================
- Hits 16365 16361 -4
- Misses 37269 37542 +273
- Partials 2979 2980 +1 |
❌ 55 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
5cfa36b to
2cea9a2
Compare
…reatevalidationentry
…reatevalidationentry
…reatevalidationentry
…reatevalidationentry
…reatevalidationentry
…reatevalidationentry
No description provided.