Skip to content
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

fix: add proof of possession for side vote addrs #353

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

NathanBSC
Copy link
Contributor

@NathanBSC NathanBSC commented Jul 5, 2023

Description

add proof of possession when create or edit validator with vote address

Rationale

to solve rogue key attack

Example

./bin/bnbcli staking bsc-edit-validator --from=node0-delegator --side-vote-addr=0x877fb1b166516e86470356b13f968d878bff98505e521b1708259e203976feb72672916d34f891e10fd5fed93fa0dffe  --side-chain-id=rialto  --chain-id Binance-Chain-Ganges --node localhost:26657 --website www.hello.com --home ./.local/bc/node0 --bls-wallet=/Users/xxx/Desktop/node-deploy/.local/bsc/clusterNetwork/node0/bls/wallet

Changes

  1. when use bnbcli to edit or create validator with vote address
    the bls wallet which containing the given vote address should be provided by a new flag bls-wallet,
    and the password of the bls wallet need to be input for generating a proof of possession.
  2. proof of possession will be verified when handling txs which creating or editing validators,
    so these feature need a hardfork
  3. clear up all existed vote address when the height of hardfork reached.
  4. flag bls-password make it easily to integrated into shell script

PS: change github.com/tendermint/crypto to new created github.com/bnb-chain/tendermint-crypto
github.com/bnb-chain/tendermint-crypto is based on golang.org/x/crypto@v0.5.0 which others mod needed.

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2023

Codecov Report

Merging #353 (3ccb5b8) into develop (fbbe37a) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #353      +/-   ##
===========================================
- Coverage    45.89%   45.82%   -0.07%     
===========================================
  Files          248      248              
  Lines        24229    24263      +34     
===========================================
  Hits         11119    11119              
- Misses       12442    12476      +34     
  Partials       668      668              

@NathanBSC NathanBSC force-pushed the add_proof_of_possession branch 3 times, most recently from 70ba022 to c5396c3 Compare July 6, 2023 11:17
@buddh0 buddh0 merged commit a5c3728 into bnb-chain:develop Jul 6, 2023
@NathanBSC NathanBSC deleted the add_proof_of_possession branch July 7, 2023 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants