VDB-1368: add new geth patch as diff source#119
Conversation
35f4895 to
3321fa1
Compare
pkg/contract_watcher/types/method.go
Outdated
| ) | ||
|
|
||
| // Method is our custom method struct | ||
| type Method struct { |
There was a problem hiding this comment.
Not sure I follow why this file is included in this PR?
There was a problem hiding this comment.
I think was probably added in due to a rebasing error. I'll remove it. ✂️
| for _, accountStorage := range account.Storage { | ||
| rawDiff, formatErr := types.FromGethStateDiff(account, &stateDiff, accountStorage) | ||
| if formatErr != nil { | ||
| errs <- formatErr |
There was a problem hiding this comment.
do we potentially want to return after this? Not sure if sending an error will lead the caller to try and close the channel (leading to a panic on subsequent sends)
There was a problem hiding this comment.
This piece is a little fuzzy for me - I think you're right, that if we were to send an error to the errs channel, then it's possible that the next accountStorage we're iterating through could try to send a diff (or an error) to a channel that's already been closed... I think. Also, it probably makes sense to stop processing diffs if the system is going to shut down anyway.
| @@ -1,48 +0,0 @@ | |||
| FROM golang:alpine as builder | |||
There was a problem hiding this comment.
Probably good to remove the build/deploy here as well
go.mod
Outdated
| github.com/onsi/gomega v1.10.0 | ||
| github.com/oschwald/maxminddb-golang v1.5.0 // indirect | ||
| github.com/pborman/uuid v1.2.0 // indirect | ||
| github.com/pkg/errors v0.8.1 |
There was a problem hiding this comment.
Is this required bc of Geth? For some reason I feel like at some point we accidentally required this at some point when we really wanted the core errors package
There was a problem hiding this comment.
🤔 Not sure why that ended up in there, don't think it's necessary though.
- remove CreatedAccounts and DeletedAccounts from StateDiff - remove Path and Proofs from StorageDiff - remove BlockRlp from Payload
541c51b to
816e343
Compare
companion PR in transformers repo to add an extractDiffs dockerfile: sky-ecosystem/vdb-mcd-transformers#259