-
Notifications
You must be signed in to change notification settings - Fork 0
dbft: detach dBFT extensible payloads verifier from dBFT engine #469
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
base: bane-main
Are you sure you want to change the base?
Conversation
a059dc4 to
1d33099
Compare
|
I'm OK with these modifications, but I think @AnnaShaleva may expect more about the extensible payload, since we haven't changed the basic logic. |
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.
The original extensible payloads verifier function has been simply separated.
It doesn't solve neither #244 nor #299. Both these issues are not just about moving extensible-related code to a separate structure/file.
The purpose of #299 is to enable extensible payloads verification not only for CNs, but also for non-mining nodes. That's why it is suggested to abstract extensible verification service, but the key issue is that his service should be properly integrated with dbft network protocol to be active even on seed nodes (right now extensible sender is not verified by non-mining nodes):
go-ethereum/eth/protocols/dbft/pool.go
Line 94 in 3ac8c58
| err = p.chain.IsAddressAllowed(m.Sender) |
So probably it would be a good idea to make this service managed by blockchain itself, i.e. to make it a part of Eth blockchain API (right now it's bound to the activity of dBFT event loop).
The purpose of #244 is to implement per-block cache for extensible whitelist members and update this cache only when it's necessary (right now - only for those blocks when committee may be changed). This cache should work exactly the same way as in NeoGo, refer to the original issue for link and for initial implementation. Also, in NeoGo this cache is bound to the blockchain's block processing routine, since it's quite native to update the whitelist exactly after the block is processed by the chain. The same logic should be suitable for Eth.
Previously, I misunderstood the meaning. So, I'll first solve the #299 issue and incorporate it into the Eth blockchain API. |
Note that it’s just an assumption, we need to check may be there’s a better place for this cache. |
1d33099 to
d1e1313
Compare
|
I have completed the integration work. Now let's see if there are any areas that can be improved? @AnnaShaleva |
d1e1313 to
2fd9322
Compare
2fd9322 to
ee44beb
Compare
ee44beb to
64f7a76
Compare
Close #299 and #244.
The original extensible payloads verifier function has been simply separated. I'm not sure if the current position is reasonable. Everyone is welcome to offer suggestions.