Initialize by upgrading - #780
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #780 +/- ##
===========================================
+ Coverage 34.56% 48.77% +14.21%
===========================================
Files 58 211 +153
Lines 2798 23021 +20223
Branches 494 494
===========================================
+ Hits 967 11228 +10261
- Misses 1831 10255 +8424
- Partials 0 1538 +1538 |
rachel-bousfield
suggested changes
Jul 20, 2022
| _ = sto.SetByUint64(uint64(networkFeeAccountOffset), common.Hash{}) // the 0 address until an owner sets it | ||
| _ = sto.SetByUint64(uint64(chainIdOffset), common.BigToHash(chainConfig.ChainID)) | ||
| _ = sto.SetUint64ByUint64(uint64(genesisBlockNumOffset), chainConfig.ArbitrumChainParams.GenesisBlockNum) | ||
| _ = l1pricing.InitializeL1PricingState(sto.OpenSubStorage(l1PricingSubspace), arbosVersion, initialChainOwner) |
Contributor
There was a problem hiding this comment.
Since this now works with actual version (1) rather than the desired one, the version check diverges. I synced a node to confirm the block hashes don't match and am checking if there's somewhere else we do too
rachel-bousfield
suggested changes
Jul 20, 2022
| switch state.arbosVersion { | ||
| case 1: | ||
| ensure(state.l1PricingState.SetLastSurplus(common.Big0)) | ||
| if chainConfig != nil { |
Contributor
There was a problem hiding this comment.
This check passes on nova, causing a divergence
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This changes how ArbOS initialization works. Previously we would initialize directly to the desired ArbOS version, as specified in the chain config. This changes the process to initialize to version 1, then run version upgrades progressively until the desired ArbOS version is reached.
This has the advantage that initialization and upgrading use the same code path.