-
Notifications
You must be signed in to change notification settings - Fork 485
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
fix: update the Transaction RPC type and fix response of txpool_content RPC #1234
fix: update the Transaction RPC type and fix response of txpool_content RPC #1234
Conversation
#[cfg_attr(feature = "std", serde(skip_serializing_if = "Option::is_none"))] | ||
pub access_list: Option<Vec<AccessListItem>>, |
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 don't know why we used #[cfg_attr(feature = "std", ...)
here before, maybe it was an error caused by copy c + v
match transaction { | ||
TransactionV2::Legacy(t) => Transaction { | ||
EthereumTransaction::Legacy(t) => Transaction { | ||
transaction_type: Some(U256::from(0)), |
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'm not sure if we should use transaction_type : None
for Legacy transaction
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.
It should be 0x0
.
From what I see in the RPC spec, this field is never None
, so we can probably remove the Option
.
- fix the response of txpool_content RPC - update the `Transaction` response type of some RPC response
@sorpaas PTAL |
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. Grumble on transaction_type
.
@sorpaas PTAL again |
…nt RPC (polkadot-evm#1234) * fix: update the Transaction type and fix response of txpool_content RPC - fix the response of txpool_content RPC - update the `Transaction` response type of some RPC response * remove Option wrapper of transaction type
Description
When using
txpool_content
RPC, I found that its return value is not compatible withgeth
/nethermind
client,so I try to fix it.
But when I read the implementation code of geth, I found that the transaction RPC type implemented by
frontier
is also different from other clients, and even different from the description in the ethereum api documentation.Like
public_key
: it's not included in the ethereum api doc, and it could be recovered from signature and raw txnraw
: it's is not included in the ethereum api doc and I think it's redundantstandard_v
: it should be namedy_parity
orv
(for compatibility) according to the ethereum api doccreates
: it's not included in the ethereum api doc, but I keep itWhat I did
Transaction
RPC type