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

Enabling PragueTime causes the chain to not "seal" #29190

Open
Amxx opened this issue Mar 7, 2024 · 6 comments
Open

Enabling PragueTime causes the chain to not "seal" #29190

Amxx opened this issue Mar 7, 2024 · 6 comments

Comments

@Amxx
Copy link

Amxx commented Mar 7, 2024

I noticed that the on the master, enabling prague causes the chain to behave strangely.

How to replicate:

  • Take the master branch
  • Edit params/config.go to add PragueTime: newUint64(0), in AllDevChainProtocolChanges
  • compile and run dev
    • make geth && ./build/bin/geth --dev --http --http.api eth,web3,net
  • perform a transaction

I am getting this log

INFO [03-07|10:54:33.034] Submitted transaction                    hash=0x31cbf838e2ab52ef37049d4b15182daaf39e90d4ba16bd9b33a63f0d7ea019ec from=0x54D2a8BC8AEAaf44212Fb60822050a59cC207188 nonce=1 recipient=0x0a8CDFfDE2d2A4e7DCcA85842f9f26516D21929C value=1,000,000,000,000,000,000
INFO [03-07|10:54:33.035] Starting work on payload                 id=0x038e8c8ba99271cd
INFO [03-07|10:54:33.036] Updated payload                          id=0x038e8c8ba99271cd number=1 hash=60320d..23a557 txs=2 withdrawals=0 gas=42000 fees=4.2e-14 root=e5a3ca..139ad4 elapsed="895.431µs"
WARN [03-07|10:54:33.036] Error performing sealing work            err="Unsupported fork"
INFO [03-07|10:54:33.036] Stopping work on payload                 id=0x038e8c8ba99271cd reason=delivery
WARN [03-07|10:54:33.069] Served eth_getTransactionReceipt         conn=127.0.0.1:33210 reqid=10 duration="82.621µs" err="transaction indexing is in progress" errdata="transaction indexing is in progress"

I understand Prague is still pretty much WIP, but this error is affecting testing of candidate EIP.

@Amxx Amxx added the type:docs label Mar 7, 2024
@Amxx
Copy link
Author

Amxx commented Mar 7, 2024

Did not mean to add type:docs. Definitelly not a doc issue.

@karalabe
Copy link
Member

karalabe commented Mar 7, 2024

Engine API spec says GetPayloadV3 can only be called during Cancun :)

Client software MUST return -38005: Unsupported fork error if the timestamp of the built payload does not fall within the time frame of the Cancun fork.

So the question is whether Prague is expected to introduce a new GetPayload version or if the spec will need to allow V3 to run during Prague too. As is, Geth if conforming to the specs :)

@Amxx
Copy link
Author

Amxx commented Mar 14, 2024

Just to make sure, there are no plan to fix that, and make Prague "usable" ? What are the recommandations for testing Prague candidates ? Marking them as Cancun to bypass that and run them in an cancun dev chain doesn't sound right to me.

@holiman
Copy link
Contributor

holiman commented Apr 24, 2024

Prague uses GetPayloadV3 now, closing

@holiman holiman closed this as completed Apr 24, 2024
@holiman
Copy link
Contributor

holiman commented Apr 24, 2024

Maybe I was too quick closing this

@holiman holiman reopened this Apr 24, 2024
@holiman
Copy link
Contributor

holiman commented Apr 24, 2024

So, NewPayloadV3 has this check:

	if api.eth.BlockChain().Config().LatestFork(params.Timestamp) != forks.Cancun {
		return engine.PayloadStatusV1{Status: engine.INVALID}, engine.UnsupportedFork.With(errors.New("newPayloadV3 must only be called for cancun payloads"))
	}

And api.eth.BlockChain().Config().LatestFork(params.Timestamp) will return forks.Prague in this case. So this method is unusable.

Not sure how to best resolve this. Since a new payload format for Prague is not yet specified (afaik), I think the simplest would be to just accept Prague too:

	if current := api.eth.BlockChain().Config().LatestFork(params.Timestamp); current != forks.Cancun && current != forks.Prague {
		return engine.PayloadStatusV1{Status: engine.INVALID}, engine.UnsupportedFork.With(errors.New("newPayloadV3 must only be called for cancun payloads"))
	}

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

No branches or pull requests

4 participants
@karalabe @holiman @Amxx and others