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

feat: add DependencyAdd functionality to client #197

Open
wants to merge 12 commits into
base: sc-feat/add-shared-lockbox
Choose a base branch
from

Conversation

skeletor-spaceman
Copy link

No description provided.

func (cfg *Config) IsDependencySetUpdate(previousBlockTimestamp, nextBlockTimestamp uint64) []*big.Int {
if cfg.ClusterConfig == nil {
panic("missing cluster config")
}
Copy link

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

Copy link
Author

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)
Copy link
Author

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"`

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.

Base automatically changed from feat/new-lockbox to sc-feat/add-shared-lockbox January 16, 2025 16:38
tynes added a commit to ethereum-optimism/specs that referenced this pull request Jan 23, 2025
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
@tynes
Copy link

tynes commented Feb 3, 2025

We are going to pause on this until we plan how we do upgrades to the proof system

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.

4 participants