forked from babylonlabs-io/babylon
-
Notifications
You must be signed in to change notification settings - Fork 1
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: remove dependency cometpv remote signer #11
Open
wnjoon
wants to merge
10
commits into
feat/bls-keystore-improvement
Choose a base branch
from
feat/remove-dependency-cometpv-remote-signer
base: feat/bls-keystore-improvement
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: remove dependency cometpv remote signer #11
wnjoon
wants to merge
10
commits into
feat/bls-keystore-improvement
from
feat/remove-dependency-cometpv-remote-signer
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commit Summary b2c5b47
|
Commit Summary 93804c5
|
@wnjoon Since the 2nd PR has been merged into upstream branch, please sync the base branch to the latest so that the already merged commits do not appear in this PR. |
wnjoon
pushed a commit
that referenced
this pull request
Jan 31, 2025
(cherry picked from commit 93804c5)
de87472
to
848829e
Compare
dongsam
requested changes
Jan 31, 2025
dongsam
reviewed
Jan 31, 2025
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.
Idea/suggestion @wnjoon
- FilePV dependency has been completely removed.
- BLS is no longer associated with PV (private-validator.json).
- To avoid confusion, any remaining occurrences of "PV" in struct names, function names, variables, and file paths should be removed.
- Refactor the
privval
path and package tobls
. - Refactor
BlsPV*
toBls
andBlsPVKey
toBlsKey
, along with related function and variable names.
Commit Summary 94d674a
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes:
GetValAddr
function to retrieve the validator address corresponding to the BLS keyprivval
toapp/signer
since BLS is no longer associated with PVRemoval of dependency on FilePV of comet
Previously, the method retrieved values from the FilePV structure, which was created using the locally stored
priv_validator_key.json
duringExtendVote
. As a result,ExtendVote
could not be performed when thepriv_validator_key.json
was not available locally, such as in cases using a remote signer.To address this, we have removed the dependency on FilePV during
ExtendVote
and added theGetValAddr
function to the checkpointing module, which returns the validator address corresponding to the BLS key.The public key corresponding to the validator address can be obtained from the epoch module, which manages the validator list. In other words, the information previously required from
priv_validator_key.json
for vote extension can now be derived through the BLS key, eliminating the need for FilePV.Additionally, in the mainnet operation code, FilePV generated from
priv_validator_key.json
is not used during app creation. Therefore, we have modified the process to inject only BlsSigner at the time of app creation.For testing, we implemented a one-time Ed25519-based private key and modified the Node structure to return the private key generated during InitChain.
In conclusion, the WrappedFilePV structure has been removed.
Support of remote signer
For testing, we used tmkms and softsign. Here is a test scenario:
1. Create priv_validator_key.json file via
babylond init
$ babylond keys add validator1 --keyring-backend test
2. Set up and start
tmkms
And modify
tmkms.toml
Start
tmkms
Since Babylon is not running yet, error logs may occur.
3. Create account and set up
genesis.json
Add the newly created
gen-bls-*.json
contents to thecheckpointing.genensis_key
field ingenesis.json
, located in.babylond/config
. Here is an example ingenesis.json
4. Change
config.toml
of Babylon to use remote signerComment out the existing entry that uses a local file, and write the priv_validator_laddr entry as follows:
5. Remove
priv_validator_key.json
from.babylond/config
After creating the
gen-bls-*.json
files, there is no longer a need for thepriv_validator_key.json
file in.babylond/config
.6. Start Babylon