-
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: add DependencyAdd functionality to client #197
base: sc-feat/add-shared-lockbox
Are you sure you want to change the base?
feat: add DependencyAdd functionality to client #197
Conversation
func (cfg *Config) IsDependencySetUpdate(previousBlockTimestamp, nextBlockTimestamp uint64) []*big.Int { | ||
if cfg.ClusterConfig == nil { | ||
panic("missing cluster config") | ||
} |
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 are 2 approaches to writing tests for this code. We can either break out the implementation logic into smaller functions and test those functions individually or test Config.IsDependencySetUpdate
. The tests should live in types_test.go
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.
should tests be included in this experimental branch?
if err != nil { | ||
return nil, NewCriticalError(fmt.Errorf("failed to create dependencySetUpdateTx: %w", err)) | ||
} | ||
afterForceIncludeTxs = append(afterForceIncludeTxs, dependencySetUpdateTx) |
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.
we still need to define is afterForceIncludeTxs
is the right place for these txs
// DependencySet represents the chains that are in the cluster. | ||
DependencySet map[uint64][]*big.Int `json:"dependency_set"` | ||
// SystemConfig represents the L1 SystemConfig contract addresses for each chain in the cluster. | ||
SystemConfig map[*big.Int]common.Address `json:"system_config"` |
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.
Note to self: needs a fix, use eth.ChainID
type which is a flat value. The *big.Int
is not safe as map key, since two different instances of the same chain ID number can have different pointers.
Adds the derivation based dependency update specs. A prototype implementation can be found in defi-wonderland/optimism#197 tldr; derivation creates a system tx that updates the dep set in L2 by calling the `DependencyManager` predeploy
We are going to pause on this until we plan how we do upgrades to the proof system |
No description provided.