-
Notifications
You must be signed in to change notification settings - Fork 39
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
perf(drive)!: verify instant lock signatures with Drive #1875
Conversation
...ci/src/execution/validation/state_transition/common/asset_lock/proof/validate/instant/mod.rs
Show resolved
Hide resolved
packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/mod.rs
Show resolved
Hide resolved
...drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs
Show resolved
Hide resolved
.../rs-drive-abci/src/execution/platform_events/core_based_updates/update_quorum_info/v0/mod.rs
Outdated
Show resolved
Hide resolved
...drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs
Outdated
Show resolved
Hide resolved
...ci/src/execution/validation/state_transition/common/asset_lock/proof/validate/instant/mod.rs
Show resolved
Hide resolved
…o perf/drve/validate-is-locks
self.update_quorums( | ||
QuorumSetType::InstantLock(instant_lock_quorum_type), | ||
block_platform_state, | ||
platform_state, | ||
&extended_quorum_list, | ||
is_validator_set_updated, | ||
core_block_height, | ||
)?; |
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.
I would do this only if instant_lock_quorum_type is different to chain_lock_quorum_type right?
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.
Fixed
|
||
use crate::platform_types::validator_set::v0::{ValidatorSetV0, ValidatorSetV0Getters}; | ||
use crate::platform_types::validator_set::v0::{ | ||
ValidatorSetV0, ValidatorSetV0Getters, ValidatorSetV0Setters, |
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.
unused
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.
Fixed
...drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs
Show resolved
Hide resolved
Agreed with @QuantumExplorer that I will merge this PR and he will do a post review of the recent two changes later. |
Issue being fixed or feature implemented
Core RPC was never designed for public access and according to our tests is a weak point in the system. Under the load, instant lock signature verification takes seconds. Since users can trigger signature verification via invalid IdentityCreateTransition for free, this open a DoS attack vector.
What was done?
How Has This Been Tested?
disable_instant_lock_signature_verification
test config option.run_chain_top_up_identities
to use InstantLock singing with DIP24 rotating quorumsrun_chain_insert_one_new_identity_per_block_with_block_signing
to use InstantLock singing with DIP8 classic quorumsBreaking Changes
InstantAssetLockProof might give different validation results, since our implementation supports only recent signatures, compared with Core RPC. This means the previous blockchain data might become invalid.
Checklist:
For repository code-owners and collaborators only