619f147b4e
output code & codehash iteratively
...
had to rf some types for this
2020-10-24 16:58:16 +08:00
51d20540ff
Implement WriteStateDiffAt
...
Writes state diffs directly to postgres
Adds CLI flags to configure PG
Refactors builder output with callbacks
Copies refactored postgres handling code from ipld-eth-indexer
2020-10-23 21:47:44 +08:00
Ian Norden
dc399a85fd
subscription endpoint for retrieving all the codehash=>code mappings that exist at provided height
2020-10-13 23:12:29 -05:00
Ian Norden
9b1e3164ea
collect and emit codehash=>code mappings for state objects
2020-10-13 13:32:56 -05:00
Ian Norden
c94e07e2c0
if statediffing is on, lock tries in triedb until the statediffing service signals they are done using them
2020-08-14 12:03:51 -05:00
Ian Norden
97454eb6fe
minor changes/fixes
2020-05-21 15:07:19 -05:00
Ian Norden
7ba6efa59c
test for state trie builder
2020-05-19 14:39:25 -05:00
Ian Norden
44aefa849b
add endpoint to fetch all state and storage nodes at a given blockheight; useful for generating a recent atate cache/snapshot that we can diff forward from rather than needing to collect all diffs from genesis
2020-05-18 20:44:17 -05:00
Ian Norden
f572e8d716
finish testing known edge cases
2020-05-18 01:27:58 -05:00
Ian Norden
e3b6d3df1c
tests for eip-158 account removal and storage value deletions; there is one edge case left to test where we remove 1 account when only two exist such that the remaining account is moved up and replaces the root branch node
2020-05-17 23:04:31 -05:00
Ian Norden
e37ce73971
handle storage deletions
2020-05-17 20:43:23 -05:00
Ian Norden
2ad905ff75
comments; explain logic
2020-05-14 16:03:36 -05:00
Ian Norden
aa7c5b0869
add ability to watch specific storage slots (leaf keys) only
2020-05-13 14:28:35 -05:00
Ian Norden
347a7ba0e8
update top level tests
2020-05-13 14:03:45 -05:00
Ian Norden
b7048a3d66
fix builder so that we handle account deletions properly and properly diff storage when an account is moved to a new path; update params
2020-05-13 12:40:19 -05:00
Ian Norden
b7c412d303
diff type for representing deleted accounts
2020-05-10 15:44:21 -05:00
Ian Norden
5598d67872
common.BytesToHash(path) => crypto.Keaccak256(hash) in builder; BytesToHash produces same hash for e.g. []byte{} and []byte{\x00} - prefix \x00 steps are inconsequential to the hash result
2020-05-08 11:58:22 -05:00
Ian Norden
d07dc803d2
adjust statediff builder tests to changes and extend to test intermediate nodes; golint
2020-03-11 13:25:36 -05:00
Ian Norden
c2c80f32d9
fix state diff builder: emit actual leaf nodes instead of value nodes; diff on the leaf not on the value; emit correct path for intermediate nodes
2020-03-11 13:25:27 -05:00
Ian Norden
b3f10c9e69
relay receipts with the rest of the data + review fixes/changes
2020-03-05 10:11:31 -06:00
Ian Norden
ad87bad4de
review fixes; proper method signature for api; adjust service so that statediff processing is halted/paused until there is at least one subscriber listening for the results
2020-03-05 10:11:31 -06:00
Ian Norden
35538aea05
cli parameter to limit statediffing to select account addresses + test
2020-03-05 10:11:31 -06:00
Ian Norden
19489d3b34
make state diff rlp serializable
2020-03-05 10:11:31 -06:00
Ian Norden
e7487003f2
option to process intermediate nodes
2020-03-05 10:11:31 -06:00
Ian Norden
5c62d0bcb1
make proofs and paths optional + compress service loop into single for loop (may be missing something here)
2020-03-05 10:11:31 -06:00
Ian Norden
71b41b5c77
refactoring state diff service and adding api which allows for streaming state diff payloads over an rpc websocket subscription
2020-03-05 10:11:31 -06:00
Ian Norden
bf5a25478e
refactoring statediff builder and types and adjusted to relay proofs and paths (still need to make this optional)
2020-03-05 10:11:31 -06:00