-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Add sender validation to block proposal RPC #211
feat: Add sender validation to block proposal RPC #211
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #211 +/- ##
=======================================
Coverage 91.19% 91.19%
=======================================
Files 6 6
Lines 284 284
=======================================
Hits 259 259
Misses 25 25 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
05f72b2
to
6fcd0fb
Compare
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.
This looks great to me! My only comment is on the message
field -- it seems like it would make more sense for that to be a Proposal
type rather than the String
, but I could be convinced otherwise.
6fcd0fb
to
54cb37b
Compare
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.
lgtm!
Description
Require block proposals to be signed by an approved signer before proceeding to parse and validate the proposal. Because validating a block proposal is an expensive operation, allowing anyone to submit a proposal would be a potential Denial of Service attack vector.
See corresponding issue for full details.
Applicable issues
Additional info (benefits, drawbacks, caveats)
Vec::contains()
. Depending on the size of the signer set, it may be good to change this to aHashSet
(orBTreeSet
), but that would require a code change in stacks-blockchain: DerivingHash
(orOrd
) forSecp256k1PublicKey
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml