-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing Otterscan support (#5414)
* Implementing Otterscan support Adds anvil support for Otterscan's custom RPC endpoints. This is still a work in progress, as I have two endpoints to implement still, but they should be **easy** (famous last words) compared to a lot of the others, so I'm opening this ahead of time to gather feedback. This was a bit tricky for a couple of reasons: * Otterscan's endpoints are inherently hard to compute with existing data (otherwise they wouldn't be needed in the first place). They solve things that the original RPC spec didn't account for (most notably, listing historical transactions by address). For anvil, this is mostly a non-issue, as we can choose to traverse all the blocks & traces in-memory. Would be interesting to test this on an node with a heavy data-set though; * After having gone through the spec, it seems to not be as well though-out as it could, and in some cases outdated compared to their code. Some of the design decisions behind it are a bit awkward to implement (see otterscan/otterscan#1081). * comments * code review * code review * code review * code review * code review * Some fixes * code review * Update anvil/src/eth/otterscan.rs Co-authored-by: evalir <[email protected]> * code review * code review * ots_getBlockDetailsByHash * search endpoints tests * tests for ots_getBlockTransactions * tests for ots_getBlockDetails * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * code review * Update Cargo.toml * code review * clippy * code review * code review --------- Co-authored-by: evalir <[email protected]>
- Loading branch information
Showing
11 changed files
with
1,207 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod api; | ||
pub mod otterscan; | ||
pub use api::EthApi; | ||
|
||
pub mod backend; | ||
|
Oops, something went wrong.