Skip to content
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

[4/N][multi quorum ejection] Create operator quorum intervals #304

Merged
merged 9 commits into from
Mar 7, 2024

Conversation

jianoaix
Copy link
Contributor

@jianoaix jianoaix commented Mar 2, 2024

Why are these changes needed?

This is part of the work to compute operator nonsigning rate for ejection in multi quorum.

Roughly the other 50% of the second step in https://docs.google.com/document/d/13nxDXTAxRhT18qZrEkTtS2F7CxjlM0qA-2EGim1bu1k/edit (first 50% is #293)

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(


import "fmt"

type OperatorQuorum struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be removed once #293 is in.

for i < len(added) && j < len(removed) {
// TODO(jianoaix): Having quorum addition and removal in the same block is a valid case.
// Come up a followup fix to handle this special case.
if added[i].BlockNumber == removed[j].BlockNumber {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we need to consider the transaction indexes of the transactions or the log index if they happened in the same transaction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea in my mind was to make a RPC call to the eth node to get the quorums after applying all txns in a block, so we could avoid having to know the details inside a block. Quorum opt-in/out are not frequent events, even more so the opt-in/out happening in a same block, so should be small cost to handle.

@jianoaix jianoaix merged commit 75e1ea8 into Layr-Labs:master Mar 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants