forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: allow FG to be opt-in #17
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1 @@ | ||
# Packages | ||
/packages/contracts-bedrock @ethereum-optimism/contract-reviewers | ||
/packages/sdk @ethereum-optimism/devxpod | ||
|
||
# Bedrock codebases | ||
/bedrock-devnet @ethereum-optimism/go-reviewers | ||
/cannon @ethereum-optimism/go-reviewers | ||
/op-batcher @ethereum-optimism/go-reviewers | ||
/op-bootnode @ethereum-optimism/go-reviewers | ||
/op-chain-ops @ethereum-optimism/go-reviewers | ||
/op-challenger @ethereum-optimism/go-reviewers | ||
/op-dispute-mon @ethereum-optimism/go-reviewers | ||
/op-e2e @ethereum-optimism/go-reviewers | ||
/op-node @ethereum-optimism/go-reviewers | ||
/op-node/rollup @protolambda @ajsutton | ||
/op-alt-da @ethereum-optimism/go-reviewers | ||
/op-preimage @ethereum-optimism/go-reviewers | ||
/op-program @ethereum-optimism/go-reviewers | ||
/op-proposer @ethereum-optimism/go-reviewers | ||
/op-service @ethereum-optimism/go-reviewers | ||
/op-supervisor @ethereum-optimism/go-reviewers | ||
/op-wheel @ethereum-optimism/go-reviewers | ||
/ops-bedrock @ethereum-optimism/go-reviewers | ||
/op-conductor @0x00101010 @zhwrd @mslipper | ||
|
||
# Ops | ||
/.circleci @ethereum-optimism/monorepo-ops-reviewers | ||
/.github @ethereum-optimism/monorepo-ops-reviewers | ||
/ops @ethereum-optimism/monorepo-ops-reviewers | ||
/docker-bake.hcl @ethereum-optimism/monorepo-ops-reviewers | ||
|
||
# Misc | ||
/proxyd @ethereum-optimism/infra-reviewers | ||
/infra @ethereum-optimism/infra-reviewers | ||
/specs @ethereum-optimism/contract-reviewers @ethereum-optimism/go-reviewers | ||
|
||
# Don't add owners if only package.json is updated | ||
/packages/*/package.json | ||
/*/package.json | ||
|
||
# JavaScript Releases | ||
/packages/*/CHANGELOG.md @ethereum-optimism/release-managers | ||
/*/CHANGELOG.md @ethereum-optimism/release-managers | ||
* @bap2pecs @lesterli @parketh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
and we can wrap this logic inside the
EnableBTCStaking
functionThere 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.
Also what will happen if an OP node enables BTC staking and run OP node for a while, shuts down OP node, and restarts OP node with BTC staking disabled? Given that this function tries to write finalised block to DB, would it be possible that the finaliser needs to iterate over more blocks after the restart?
This seems to be another reason of keeping BTC stake finalised in a separate KV store, in parallel with unsafe/safe/finalised states of blocks in OP stack
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.
in this case, once it's restarted, it will continue to operate normally (e.g. fetch L1 data, derive L2 blocks). when it tries to finalise a block, it will simply skip the BTC quorum check.
what do you mean by itereating over more blocks? after the restart, it won't call the gRPC of FG. it will become a vanilla op-node
this data is already stored in the FG KV db.
op-node
connects with it via gRPCThere 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.
@SebastianElvis do you mean to create a helper function like this?
this doesn't seem very useful
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.
Let's say block
h
is finalised in OP stack term + BTC stake finalised, andh+1
toh+5
are finalised in OP stack term but haven't been BTC stake finalised. Then upon retsart with BTC staking disabled, Op node starts iterating fromh+1
but noth+5
. However it's supposed to start fromh+5
.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.
got it. it's fine to re-derive from h1. although there will be some wasted rpc calls to L1, it doesn't require any changes in the codebase and such restart should be rare
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.
yep. not blocking for now but wdyt about having some doc / TODO for this?
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.
there isn't any TODO here as the optimization has low ROI. (i.e. it requires intrusive changes for marginally gain)
i'd say not adding any comments to avoid confusion