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

Update "--dev" to use the Cancun hardfork. #3311

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Amxx
Copy link

@Amxx Amxx commented Mar 9, 2024

Currently, calling ethereumjs --dev=true starts a network using the london hardfork. This is quite different from mainnet, and IMO is not representative of what dev would expect.

With DenCun hitting mainnet in the next days, I believe that this should be updated to Cancun.

@holgerd77
Copy link
Member

Will circle in @g11tech in here, most experienced with these dev flags: Gajinder, can we update here, or does this have side effects on tests (maybe we'll directly see on CI run, not yet finished while I am writing here)?

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.91%. Comparing base (891ee51) to head (45f4402).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.43% <ø> (ø)
blockchain 91.61% <ø> (ø)
client 84.89% <ø> (ø)
common 98.43% <ø> (ø)
devp2p 82.12% <ø> (ø)
ethash ∅ <ø> (∅)
evm 74.05% <ø> (ø)
genesis 99.98% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 77.00% <ø> (ø)
trie 89.01% <ø> (-0.32%) ⬇️
tx 95.55% <ø> (ø)
util 89.19% <ø> (ø)
vm 79.85% <ø> (ø)
wallet 88.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not approving if we want the unreleased changelog edit removed

@g11tech
Copy link
Contributor

g11tech commented Mar 11, 2024

Also as mentioned in the PR, let's just schedule it to dencun

The only reason we may want it to be on London however is to have a runnable chain without a CL

@holgerd77
Copy link
Member

Updated this via UI

@holgerd77
Copy link
Member

The only reason we may want it to be on London however is to have a runnable chain without a CL

@g11tech can't judge here. So: merge or not? (maybe also for others) 🙂

@holgerd77
Copy link
Member

Updated this via UI

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't think its as simple as changing the starting hardfork to start on Cancun. If you run npx tsx bin/client.ts --dev=true you get this sort of output:

[03-12|20:17:18] INFO ---------------------------
[03-12|20:17:18] INFO Client started successfully
[03-12|20:17:18] INFO ---------------------------
[03-12|20:17:28] INFO txsByPriceAndNonce selected txs=0, skipped byNonce=0 byPrice=0 byBlobsLimit=0 
[03-12|20:17:28] INFO Miner: Assembling block from 0 eligible txs (baseFee: 7)
[03-12|20:17:28] INFO Miner: Sealed block with 0 txs (in turn)
[03-12|20:17:28] WARN Execution of block number=1 hash=0x8c93…dc62 hardfork=cancun failed:
Error: invalid block stateRoot, got: 0x5e2514a6fc32e2f9b31cbe99d78a5caa2e5e8fbd51461faa8d3f0cc59714ab37, want: 0x874ad777665ba3859329672df99b4bfee3ee775b36379d773ae69dc6d8612db2 (vm hf=cancun -> block number=1 hash=0x8c93e4329f71ba3f7fd33c6f001572b1e31bd02b8ba7c7a044d2438e6523dc62 hf=cancun baseFeePerGas=7 txs=0 uncles=0) 
[03-12|20:17:28] INFO Executed blocks count=1 first=0 hash=0xa8e0…b110 td=3 baseFee=7 hardfork=cancun last=0 hash=0xa8e0…b110 txs=0 
[03-12|20:17:36] INFO Stopped synchronization.

It's trying to start a PoA network with post-merge hardforks which is an invalid combination with the current dev genesis config. I agree with the spirit of the PR but we need to think about something a little more fully orbed before we take this in, maybe provide something like the lodestar-quickstart setup so it comes paired with a CL client so it can produce valid blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants