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

[Bitcore-Node] Standardize EVM Traces #3490

Closed
wants to merge 25 commits into from

Conversation

escottalexander
Copy link
Contributor

@escottalexander escottalexander commented Nov 15, 2022

This PR standardizes the way we record transaction trace data in Bitcore DB. Instead of handling it two ways (seperate Erigon and Geth classes) we transform the Erigon traces to be like Geth.

There are three parts to this:

  1. Now when Erigon blocks are synced they are transformed to be identical to blocks synced from Geth (the only difference was the way we were storing internal for Erigon and calls for Geth)
  2. Added a couple places where we handle old db entries to transform them before continuing ( if we ever chose to update old entries then we could remove these places, they have been commented on accordingly)
  3. Removed several places where we had chunks of code handling Erigon and then handling Geth, now it just expects the Geth classes to be the standard

@@ -43,7 +43,7 @@ export interface ErigonTraceResponse {
type: 'reward' | 'call' | 'delegatecall' | 'create';
}

export interface ClassifiedTrace extends ErigonTraceResponse {
export interface ErigonTxTrace extends ErigonTraceResponse {
Copy link
Contributor Author

@escottalexander escottalexander Nov 15, 2022

Choose a reason for hiding this comment

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

Small note on this change: I renamed ClassifiedTrace to ErigonTxTrace but then at another spot I define a new type called ClassifiedTrace and that one represents the standard Geth class with which to Erigon now conforms.

@escottalexander
Copy link
Contributor Author

Closing since these changes are very out of date and will be managed a different way with new chain additions.

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.

5 participants