Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

refactor: instant-finality feature via special RPC url #568

Merged
merged 5 commits into from
Nov 15, 2022
Merged

Conversation

RetricSu
Copy link
Contributor

@RetricSu RetricSu commented Nov 3, 2022

RPC method updated in this PR:

  • eth_getTransactionReceipt
  • RPC which support block parameter, except for
    • eth_getBlockByNumber
    • eth_getBlockTransactionCountByNumber
    • eth_getTransactionByBlockNumberAndIndex
      which does not support pending in our code since a long time ago, we might need to check those 3 RPC methods later

In this pr, we use different RPC URLs to tell if the instant-finality-hack mode is enabled so that we can provide the feature for user while keeping other users who care more about compatibility than such feature happy as well.

Notice how the integration tests last longer in non-instant-finality mode, this can be reduced after we finished the following todos:

TODO before PR merge:

One test case is also altered to allow CI to pass under non-instant-finality mode.

Copy link
Contributor

@classicalliu classicalliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update other RPCs too ?
For example, eth_getBalance(address, "latest")
With instant finality, it should include pending states, but without instant finality, it should not.

@RetricSu
Copy link
Contributor Author

RetricSu commented Nov 9, 2022

Should update other RPCs too ? For example, eth_getBalance(address, "latest") With instant finality, it should include pending states, but without instant finality, it should not.

oh right, we treat lastest as pending in instant-finality hack. will update later

@RetricSu
Copy link
Contributor Author

RetricSu commented Nov 9, 2022

Should update other RPCs too ? For example, eth_getBalance(address, "latest") With instant finality, it should include pending states, but without instant finality, it should not.

updated

README.md Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants