-
Notifications
You must be signed in to change notification settings - Fork 4
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
*: extend PreBlock processing callback #129
Conversation
TPKE decryption shares verification is performed in ProcessPreBlock callback when PreBlock is already constructed and all transactions are available. If some of the received shares can't decrypt Envelopes' content then dBFT should wait for more PreCommit payloads from other "honest" CNs. Signed-off-by: Anna Shaleva <[email protected]>
It's a must-have condition for PreBlock construction. Signed-off-by: Anna Shaleva <[email protected]>
PreCommits can't be verified against PreHeader because PreCommit carries transactions-sensitive information. Signed-off-by: Anna Shaleva <[email protected]>
PreBlock may be created earlier at the PreCommit verification level, and it's OK. However, it's required at least M PreCommits to _process_ PreBlock. Signed-off-by: Anna Shaleva <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #129 +/- ##
==========================================
- Coverage 59.47% 59.25% -0.22%
==========================================
Files 32 32
Lines 1821 1831 +10
==========================================
+ Hits 1083 1085 +2
- Misses 659 665 +6
- Partials 79 81 +2 ☔ View full report in Codecov by Sentry. |
Move hasAllTransactions check from PreBlock constructor to onPreCommit callback. The rest of CreatePreBlock usages already have this check. Signed-off-by: Anna Shaleva <[email protected]>
I found one more bug. |
@roman-khimov, I placed encrypted data decoding to the wrong dBFT callback, so the library itself works correctly, the mistae was on the NeoX side. Ready to be merged. |
The necessity of this extension is described in https://github.com/bane-labs/go-ethereum/pull/301#discussion_r1726514210. We need at least
M
correct PreCommits to decrypt Envelopes content, but decryption may be checked only by using the group of PreCommits. Thus, we can't say whether a single PreCommit can/can't decrypt Envelopes content.@roman-khimov, please, review it carefully, I checked what I could and there seems to be no tricks possible to skip verification, but maybe you'll fined something. May be it'll be easier to review if you take a look at https://github.com/bane-labs/go-ethereum/pull/287/commits/f4e830c751ae6a4ee94adb6db42096133abfa235.