-
Notifications
You must be signed in to change notification settings - Fork 21.1k
core, internal, miner, signer: convert legacy sidecar in Osaka fork #32347
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
base: master
Are you sure you want to change the base?
Conversation
chainHead := api.b.CurrentHeader() | ||
isOsaka := api.b.ChainConfig().IsOsaka(chainHead.Number, chainHead.Time) | ||
if isOsaka { | ||
config.blobSidecarVersion = types.BlobSidecarVersion1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, the legacy proofs submitted by users will be implicitly converted to cell proofs.
@@ -1603,7 +1630,7 @@ func (api *TransactionAPI) SignTransaction(ctx context.Context, args Transaction | |||
// no longer retains the blobs, only the blob hashes. In this step, we need | |||
// to put back the blob(s). | |||
if args.IsEIP4844() { | |||
signed = signed.WithBlobTxSidecar(types.NewBlobTxSidecar(types.BlobSidecarVersion0, args.Blobs, args.Commitments, args.Proofs)) | |||
signed = signed.WithBlobTxSidecar(types.NewBlobTxSidecar(sidecarVersion, args.Blobs, args.Commitments, args.Proofs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, the legacy proofs submitted by users will be implicitly converted to cell proofs.
@@ -425,21 +424,6 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran | |||
if !env.txFitsSize(tx) { | |||
break | |||
} | |||
|
|||
// Make sure all transactions after osaka have cell proofs | |||
if isOsaka { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conversion is unnecessary and useless.
If only affects the referenced transaction object, while the one in the blobpool/datadir won't be changed.
What really matters if the ones in the blobpool, for serving GetBlob APIs at the engine api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, the conversion during block production is very dangerous, as it's time costy.
It's very likely to miss the slot due to the expensive proof generation.
for i, tx := range txs { | ||
if errs[i] != nil { | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One part is still missing:
During the Osaka activation, we should somehow convert the legacy sidecars to new format. It should be done in a following PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelqu'un utilise mes compte et faites beaucoup des modifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I added a mainly cosmetic commit
Ah looks like some test has been failing because of this |
This pull request implements #32235 , constructing blob sidecar in new format (cell proof)
if the Osaka has been activated.
Apart from that, it introduces a pre-conversion step in the blob pool before adding the txs.
This mechanism is essential for handling the remote legacy blob txs from the network.
One thing is still missing and probably is worthy being highlighted here: the blobpool may
contain several legacy blob txs before the Osaka and these txs should be converted once
Osaka is activated. While the
GetBlob
API in blobpool is capable for generating cell proofsat the runtime, converting legacy txs at one time is much cheaper overall.