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

eth: rpc: various Ethereum JSON-RPC API fixes #9837

Merged
merged 13 commits into from
Dec 19, 2022
Merged

eth: rpc: various Ethereum JSON-RPC API fixes #9837

merged 13 commits into from
Dec 19, 2022

Conversation

ychiaoli18
Copy link
Contributor

@ychiaoli18 ychiaoli18 commented Dec 11, 2022

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:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@ychiaoli18 ychiaoli18 requested a review from a team as a code owner December 11, 2022 15:09
@ychiaoli18 ychiaoli18 changed the title eth: rpc: handle block parameter in rpc calls eth: rpc: handle block parameter and return tx from mpool Dec 12, 2022
Copy link
Member

@raulk raulk left a 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.

node/impl/full/eth.go Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
api/eth_types.go Outdated Show resolved Hide resolved
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 {
Copy link
Member

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).

Copy link
Contributor Author

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

@raulk raulk changed the title eth: rpc: handle block parameter and return tx from mpool eth: rpc: various Ethereum JSON-RPC API fixes Dec 14, 2022
@raulk raulk self-assigned this Dec 19, 2022
chain/types/ethtypes/eth_transactions.go Outdated Show resolved Hide resolved
@@ -63,6 +63,52 @@ func TestTxArgs(t *testing.T) {
}
}

func TestSignatures(t *testing.T) {
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

2 participants