-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
eth: rpc: various Ethereum JSON-RPC API fixes #9837
Conversation
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.
We desperately need integration tests for all of this.
api/eth_types.go
Outdated
@@ -83,6 +83,9 @@ func (e EthBytes) MarshalJSON() ([]byte, error) { | |||
if len(e) == 0 { | |||
return json.Marshal("0x") | |||
} | |||
if len(e) == 1 && e[0] == 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.
What case does this deal with? Where do we return a non-nil byte string with a single 0 byte (which is different to an empty byte string).
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.
This should be removed, and the type of R, S, V should be big.Int instead of bytes. The empty value of big.Int should be 0x0 and the empty value of bytes should be 0x
@@ -63,6 +63,52 @@ func TestTxArgs(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestSignatures(t *testing.T) { |
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.
Should add bad cases too.
Related Issues
Fixes filecoin-project/ref-fvm#1016
Fixes filecoin-project/ref-fvm#1158
Fixes filecoin-project/ref-fvm#1196
Fixes filecoin-project/ref-fvm#1269
Fixes filecoin-project/ref-fvm#1135.
Fixes #9820
Proposed Changes
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps