all: v1.15.0 pre-release merge review fixes #481
Closed
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.
Description
Fixes on top of #474
Ledger diff
Original op-geth ledger mac workaround, due to usage-ID not being detected correctly, and being 0:
https://github.com/ethereum-optimism/op-geth/pull/223/files
Upstream PR was closed, since it was deemed a workaround:
ethereum/go-ethereum#28863
This issue then tracked the non-workaround, of fixing the USB lib:
ethereum/go-ethereum#28711
The USB lib was then fixed in:
ethereum/go-ethereum#28945
And recently mdehoog from Base made upstream Ledger fixes, for new devices, that caused a merge conflict:
ethereum/go-ethereum#31004
We're going with the upstream ledger code, and dropping the diff, since it should no longer be necessary.
Signer diff
We should just entirely disable the Prague signer, until L2-Pectra support is allocated to.
The state-transition doesn't check the allowed tx-types,
beyond just using the right kind of signer, which naturally filters transactions.
Returning a prague-signer, if there's some hint of prague in the config,
in LatestSigner is unsafe, as it would allow blob-transactions to be accepted into the chain.
So for now we don't return prague-signer in
LatestSigner
andMakeSigner
.We can later update the diff to not allow blob-txs selectively on optimism-config.
Snap-sync legacy-diff
ContractCode
seemed to be removed from your diff.Technically we need it to serve unprefixed contract-code nodes from legacy DBs to snap-sync.
Any node that resynced will have prefixes, but I think the oldest bedrock-transition DB snapshots don't have this prefixing.
Note that non-snap-sync code access upstream is still attached to the legacy code-reading method.
core/genesis.go
diffapply
func in upstream.On old code:
In the upstream commit,
the following comment was left:
So upstream they're doing something similar: load an existing chain, without existing genesis. But then they proceed to construct and commit the genesis into the regular DB.
In the
storedCfg == nil
case, theToBlock()
andCommit()
calls here handle the migrated-chain case where we start with a genesis with embeddedStateHash
instead of full genesis trie.So for stateless snap-sync nodes, this code should run.
However, the bedrock-migration datadir genesis config may (not sure, to be confirmed) not have the extra StateHash field.
In that case, we may need to avoid committing the DB again, as we'll be unable to reconstruct the genesis block state-root from the genesis config.
I added a safeguard for this, to not try to overwrite the genesis data with incomplete data.
If we download the migration datadir snapshot, then we can give it a try, to confirm what happens here.