-
Notifications
You must be signed in to change notification settings - Fork 200
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
Go native tracer #1978
Go native tracer #1978
Conversation
@palango Seems we don't have a way to decode all bytes into ethcompatible transactions, those test cases https://github.com/celo-org/celo-blockchain/blob/master/eth/tracers/tracers_test.go#L205-L297 can't pass 😭 |
f28e518
to
cdd905e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@jsvisa Thanks a lot for looking into this. I don't have much experience with this code, but someone from team is going to have a look. It might take a few days though. |
@jsvisa @palango if I'm not mistaken that's the address for the directory of core contracts. Without taking a real look at this I'd say it could have something to do with either paying vaildator rewards at the end of the tx or paying the gas with a different currency than the native one (celo stable tokens) |
@hbandura thanks for your explanation. eg: "gas": "0x186a0",
"gasUsed": "0xffee3628", Does this means Thank you in advance. |
You can set the currency used to pay fees with using the |
@jsvisa I have time to look deeper into this now. How did you pick the commits to include in this? |
Do you means the git commits? I pick up in manually |
How did you select them? I see more tracing related commit in the upstream repository. Also, I found out that the commit This makes the transactions undecodable, so it would be interesting to know where you found that particular commit. |
e7e3fa5
to
30c5647
Compare
d6528ef
to
f56b115
Compare
I'm putting this aside for now, there's higher priority things and one test still fails, for unclear reasons. The test is
The nil pointer dereference happens in the My best guess currently is that some object is shared between goroutines and this flag is overwritten incorrectly somewhere. |
@palango I will take some time in the next days to have a look. |
Looked into this a bit and I may have found some more information on what's going on here, though still don't have a thorough understanding/solution:
|
…828) Signed-off-by: Delweng <[email protected]>
This PR changes long-running chain tracing, so that it at some points releases the memory trie db, and switch over to a fresh disk-backed trie. Signed-off-by: Delweng <[email protected]>
Signed-off-by: Delweng <[email protected]>
* eth/tracers: add basic native loader * eth/tracers: add GetResult to tracer interface * eth/tracers: add native call tracer * eth/tracers: fix call tracer json result * eth/tracers: minor fix * eth/tracers: fix * eth/tracers: fix benchTracer * eth/tracers: test native call tracer * eth/tracers: fix * eth/tracers: rm extra make Co-authored-by: Martin Holst Swende <[email protected]> * eth/tracers: rm extra make * eth/tracers: make callFrame private * eth/tracers: clean-up and comments * eth/tracers: add license * eth/tracers: rework the model a bit * eth/tracers: move tracecall tests to subpackage * cmd/geth: load native tracers * eth/tracers: minor fix * eth/tracers: impl stop * eth/tracers: add native noop tracer * renamings Co-authored-by: Martin Holst Swende <[email protected]> * eth/tracers: more renamings * eth/tracers: make jstracer non-exported, avoid cast * eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity * eth/tracers: minor comment fix * eth/tracers/testing: lint nitpicks * core,eth: cancel evm on nativecalltracer stop * Revert "core,eth: cancel evm on nativecalltracer stop" This reverts commit 01bb908790a369c1bb9d3937df9325c6857bf855. * eth/tracers: linter nits * eth/tracers: fix output on err Co-authored-by: Martin Holst Swende <[email protected]> Signed-off-by: Delweng <[email protected]>
Signed-off-by: Delweng <[email protected]>
f56b115
to
a7d11fe
Compare
@eelanagaraj after you cherry pick efbc25a the datarace issue resolved or not? |
BTW, seems some trace testcases in https://github.com/celo-org/celo-blockchain/blob/master/eth/tracers/tracers_test.go were removed, I think it is necessary to keep them |
Hey @jsvisa so the actual issue causing that test failure looks like it was caused by the bug fixed here: #2061. In that PR, we also re-included the commented-out tests, to make sure that the frozen test output was then the same in this PR (to have a basis for comparison for this PR). Let me know if something looks like it was missing/went wrong in the process of rebasing this PR though, but the test case outputs should now already be updated (from master)! We are currently doing some more thorough testing on the go native tracer vs. the old one for a variety of txs and investigating some strange discrepancies with gasUsed values, but will keep you updated! |
@eelanagaraj thanks for your quick reply, seems the testcases(callTracer tester) more moved inside the internal dir, so it's ok. |
And does this issue also resolved? |
Hey @jsvisa ! That's what I'm currently looking into -- the current working theory is that this actually represents a negative value (2s complement; this may have not been an unsigned int in the past and apparently we have had negative I'll let you know if/when I understand if negative |
Still not 100% what's going on with the underflows/negative gas values, but it looks like that is not a new thing with this PR. The mismatches I found between the callTraces' Once this PR is merged (adds a few more Celo-specific tracing tests), I'll update this PR and it should be ready to merge from my view. Thanks for your patience 🙏 |
d049c36
to
9ffa6f7
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1978 +/- ##
==========================================
+ Coverage 54.30% 55.24% +0.94%
==========================================
Files 692 675 -17
Lines 115642 113693 -1949
==========================================
+ Hits 62795 62810 +15
+ Misses 49014 47028 -1986
- Partials 3833 3855 +22
☔ View full report in Codecov by Sentry. |
I think we just need second reviews from me & @palango, and any additional blockscout testing that @carterqw2 wants to do! |
e82bdb2
to
4308c7a
Compare
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.
LGTM, will merge pending testing/sign-off from @carterqw2
Continued in #2137 |
implements #1970
DON'T MERGE, test in process.