Relay all block data + statediffs over full node websocket subscription #8
Closed
i-norden
wants to merge 17 commits from
rpc_statediffs_at_head into staging
pull from: rpc_statediffs_at_head
merge into: :staging
:v1.11.6-statediff-v5
:v1.10.26-statediff-4.2.2-alpha
:jenkins_reborn
:v1.10.25-statediff-v4
:v1.10.25-statediff-v4-wip
:cerc_refactor
:release-v1.10.23-statediff-4.2.0-alpha
:v1.10.23-statediff-v4
:v1.10.23-statediff-v4-wip
:v1.10.22-statediff-v4-wip
:v1.10.22-statediff-v4
:v1.10.21-statediff-v4
:linter_updates_wip
:release-v1.10-21-statediff-4.1.2-alpha
:release-v1.10.21-statediff-4.1.2-alpha
:v1.10.20-statediff-v4
:v1.10.19-statediff-v4
:statediff
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
bug
critical
duplicate
enhancement
epic
help wanted
in progress
invalid
low priority
question
rebase
v1
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#8
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This build is focused on the seed node and I've gotten rid of the CSV stuff, because I think it is more likely to get accepted into Geth this way (there's no precedent for writing out CSVs anywhere else in Geth), so this might not be ideal for all purposes.
This is the branch that syncAndPublish needs to work with.
Also, I made a point to move files in the same commit but for some reason it looks like some history was still lost...
This is looking super cool, thanks for doing all this work! 🎉 🏅 💯
I wonder if we should open this PR against
stagingorstatediffing? From what I remember, thestatediffingbranch was a bit more up-to-date thanstaging- was current with geth v1.8.19 (I think). It also makes sense to me that we include the state diff work separate from the work that gets this repo up-to-date.@@ -0,0 +51,4 @@}// Subscribe is the public method to setup a subscription that fires off state-diff payloads as they are createdfunc (api *PublicStateDiffAPI) Subscribe(ctx context.Context) (*rpc.Subscription, error) {I keep confusing the two concepts of subscription that we have within the statediff pkg:
I wonder if there's a way to distinguish these a bit more? Perhaps I am getting it confused because it's new, and I need to sit with the code a bit more. So this may be a non-issue 🙃
@@ -0,0 +80,4 @@log.Error("Failed to unsubscribe from the state diff service", err)}returncase <-notifier.Closed():It looks like this
Closed()method is deprecated in favor of an error channel💯
Should this be updated to 2019?
These notes are helpful, but I'm wondering if we want to check them in here.
same here - 2019?
Oh yeah, it probably should! The license date is different across a lot of the files but I think new files should have the year they were created.
@@ -0,0 +51,4 @@}// Subscribe is the public method to setup a subscription that fires off state-diff payloads as they are createdfunc (api *PublicStateDiffAPI) Subscribe(ctx context.Context) (*rpc.Subscription, error) {I'm definitely not opposed to making this distinction more clear, the issue is that the rpc connection subscription method needs to be named
Subscribeto work with this rpcClient method.@@ -0,0 +80,4 @@log.Error("Failed to unsubscribe from the state diff service", err)}returncase <-notifier.Closed():Nice catch! So that means we can just drop this
notifier.Closed()and therpcSub.Err()should take care of everything?Hey @elizabethengelman thank you for the review! You're right about it being better to open up the PR against
statediffing, althoughstagingis now at a higher head state closer to where we would want to merge back into the original repo. So I'm going to rebasestatediffingto the same state before opening this PR against it, if that is okay. I was also a bit concerned about overwriting work onstatediffingsince I've gotten rid of the CSV stuff here and I'm not sure if that is still relevant to mcd_transformers or something else.@@ -0,0 +80,4 @@log.Error("Failed to unsubscribe from the state diff service", err)}returncase <-notifier.Closed():Yep, that's how I'm interpreting it!
@i-norden Good call, I wonder if it makes sense keeping a branch around with the CSV state diff work, just in case we want to go back to that in the future. 🤔
Update: just pushed up this branch, just in case we'd like to go back an look at the csv work, once this socket work is merged into
statediffing.Pull request closed