-
Notifications
You must be signed in to change notification settings - Fork 473
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
standardize BlobTxMissingBlobs error message #8129
base: master
Are you sure you want to change the base?
Conversation
…actual error, but should be wrapper error
@@ -221,9 +219,8 @@ public CallOutput CreateAccessList(BlockHeader header, Transaction tx, Cancellat | |||
TransactionResult tryCallResult = TryCallAndRestore(_processingEnv.Build(header.StateRoot!), header, tx, false, | |||
new CompositeTxTracer(callOutputTracer, accessTxTracer).WithCancellation(cancellationToken)); | |||
|
|||
return new CallOutput | |||
return new CallOutput(tryCallResult.Success ? callOutputTracer.Error : tryCallResult.Error, tx.GasLimit) |
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.
I think I would prefer explicit setting the Error
property as it was. Just create here a helper method to create error message.
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.
created a helper function ConstructErrorMessage
private string? ConstructError(TransactionResult txResult, string? tracerError, long gasLimit) | ||
{ | ||
string? error = txResult.Success ? tracerError : txResult.Error; | ||
return error != null ? $"err: {error} (supplied gas {gasLimit})" : null; |
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.
is not null
Geth:
Nethermind:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "BlobTxMissingBlobs: Blob transaction must have blobs."
}
}
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.