Relay all block data + statediffs over full node websocket subscription #8
Labels
No Label
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
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "rpc_statediffs_at_head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
staging
orstatediffing
? From what I remember, thestatediffing
branch 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 created
func (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)
}
return
case <-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 created
func (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
Subscribe
to work with this rpcClient method.@ -0,0 +80,4 @@
log.Error("Failed to unsubscribe from the state diff service", err)
}
return
case <-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
, althoughstaging
is now at a higher head state closer to where we would want to merge back into the original repo. So I'm going to rebasestatediffing
to the same state before opening this PR against it, if that is okay. I was also a bit concerned about overwriting work onstatediffing
since 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)
}
return
case <-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