-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
all: live chain-aware tracing #27629
Closed
Closed
Changes from 26 commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
642a374
Initial support for extended tracer
s1na e25065b
capture keccak preimage
s1na f67ac09
add hooks to state object & genesis
s1na 84d6432
add log and newAccount hooks
s1na ee791b2
add gas consumption hook
s1na 0d25fbc
pass logger to BC through vmConfig
s1na 8db1078
fix genesis logging
s1na 788851b
disable tracing for miner processed txes
s1na 057bbda
add comments
s1na a7de17e
only emit event for new accounts
s1na 3787816
Upgrade TxStart and TxEnd hooks
s1na 3975c7c
minor
s1na 619ac29
provide StateLogger for short-lived tracers
s1na 54171ee
pass env in TxStart
s1na 3cabef4
capture block end errors
s1na f1bd415
rm extra CaptureTxEnd
s1na d799c68
nicer printer output
s1na add825e
fix BlockEnd in case of err
s1na 0aeec7f
mv td to OnBlockStart
s1na b692a68
add final & safe headers to BlockStart
s1na 2a59d24
add genesis alloc to hook
s1na 4370527
fix prefetcher double emit
s1na 5466fa3
Capture balance reason (#12)
maoueh 2faf3db
emit err on tx validation failure
s1na b2b32e6
fix merge conflict
s1na 09ee197
fix merge conflict
s1na f9f377d
capture call validation errors
s1na b7ff573
minor refactor
s1na 00a19d3
Fixed tests compilation (#13)
maoueh 216a4b0
Added writing of `genesis.Alloc` on bootstrap (#15)
maoueh 659043a
pass tracer name via cli
s1na 9c999c3
Use noopTracer as base for loggers
s1na 0be6e22
add comment to statedb logger
s1na abd8807
use defer for OnBlockEnd
s1na f7ca31e
fix import cycle in blockchain test
s1na 651c438
fix runtime tests
s1na 74c1f30
Fixed `BlockchainLogger` tracer not being correctly set up up to `Blo…
maoueh ff3c15f
Full OnGasConsumed loop and added `GasChangeReason` (#16)
maoueh 6ee4fb8
resolve merge conflicts
s1na 1914bc6
error code for VM failures (#18)
maoueh 429dcc9
fix merge conflict
s1na e65f14a
update state processor
s1na e4399a6
Use applyTransaction in tracer instead of applyMessage
s1na 14d603b
add comment re newAccount precompile
s1na 023ade6
instrument when inserting known block
s1na ee58cc7
statedb: precompile check before onNewAccount
s1na dc1175e
rm unnecessary line
s1na da8b362
minor
s1na 0d268b7
fix TxStart for traceCall
s1na cc6b68e
Fix prestate create issue, add test
s1na 6b8d216
fix setBalance reasons
s1na b80aa1e
fix double-allocation
s1na 1d13645
move balance reason to metadata file
s1na 856c079
move traced block processing to own func
s1na 9c00b12
fix merge conflict
s1na 379b8d3
fix atomic followupInterrupt
s1na 56600e9
fix VMError.Unwrap
s1na 8a1f67c
forgot prestate testcase
s1na 5bc3f62
move makeTest to own file
s1na cd8c4c5
force load live tracer set
s1na 8610f8f
add hooks for beacon block root processing
s1na 00ee953
rm comment
s1na 72410c3
Fixed `BlockchainLogger.OnBlockEnd` called too much times (#19)
maoueh c341c79
Merge remote-tracking branch 's1na/extended-tracer' into extended-tracer
s1na 5190cfc
rm extra galloc capturing
s1na 9e5c96f
add chainConfig to block events
s1na f862531
rm chainConfig from OnGenesisBlock
s1na c5e407b
resolve merge conflicts
s1na 9360cab
assign values for balance reasons
s1na 0967291
Track burnt and selfdestruct withdraw bal changes
s1na ddd1b0a
fix gas purchase
s1na 0484068
fix lint issues
s1na 5e82cbe
nil check
s1na 0d254e4
fix test
s1na a52c80d
Fix test case
s1na 89d79d6
fix t8n tracer nil check
s1na 54f4bc7
fix balance check
s1na 64e35e9
revert buyGas refactor
s1na 8b3180d
revert gas refund
s1na 2d14bb5
rename and document balance change reasons
s1na 68bd6c6
Removed the `OnGenesisBlock` in `genesis.Commit` (#20)
maoueh f241a76
fix comment'
s1na 580f025
has call reverted to snapshot
s1na aa0db68
resolve merge conflict
s1na f21efbc
fix traceWriter
s1na c331930
add test case for frontier create out of storage
s1na 626fee4
fix withdraw balance change name
s1na d07264a
no balance change reason on 0 balance selfdestruct
s1na 4c1d675
resolve merge conflict
s1na 9a6b9a2
re-add simulated backend removed accidentally
s1na ae522d6
rm empty line
s1na 56862cf
emit onNewAccount when reseting account
s1na 68342ef
improve processBlock
s1na 3078dfe
minor fix
s1na 6c44a59
fix self destruct burn condition
s1na 188cd41
remove precompile check for newAccount
s1na f3c0a89
add OnBlockchainInit for chainConfig
s1na 95b5029
replace printer with noop live tracer
s1na 2cc0954
rename
s1na 57cd0c3
rm OnNewAccount
s1na 056f229
indicate known block
s1na 27f662d
fix merge conflict
s1na 706c869
fix remaining conflict
s1na 03206be
fix blockchain -> logger circular import
s1na 08cb623
live tracer err -> warn
s1na cf6a315
fix mdLogger
s1na 4cd7cb3
resolve merge conflict
s1na 674a38e
add config for tracers
s1na 0db7a19
minor fix
s1na 35291e6
resolve merge conflict
s1na 3ba6b92
remove onBeaconBlockRoot events
s1na 5f0a543
refactor onBlockStart params, new skip method
s1na 490efc5
resolve merge conflict
s1na File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
On the whole, I don't find it super elegant. Would it make sense to have two methods, e.g.
Alternatively, have the default be with reason:
I don't know really. But quite a lot of locations where you invoke
SetBalance
(Add..
,Sub..
) uses0x0
here, and it's a bit clunky.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.
I swear I had responded on this 😮 since my response has vanished:
I don't know. I feel like it will be too easy to "forget" adding a reason if there's a method for it, specially if it's the default. But I agree the
0x0
were not so appealing so changed all of them toUnspecified
. They were mostly in tests. The only production code was ineth_call
state override and simulated backend.