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(cli): fix peer_id generation #1657

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# CHANGELOG
<!--
keep a changelog
Don’t let your friends dump git logs into changelogs.
The format is based on https://keepachangelog.com
-->

## [Unreleased]
* refactor!: change some precompile input and output to tuple by @KaoImin in https://github.com/axonweb3/axon/pull/1642
* refactor: omit `address` field in chain spec parsing by @KaoImin in https://github.com/axonweb3/axon/pull/1641
* feat: rlp encode for VerifyProofPayload by @wenyuanhust in https://github.com/axonweb3/axon/pull/1637
* feat: enable get header precompile by @blckngm in https://github.com/axonweb3/axon/pull/1649
* feat: cli for metadata cell data by @blckngm in https://github.com/axonweb3/axon/pull/1640
* feat: metadata cli parse data by @blckngm in https://github.com/axonweb3/axon/pull/1644
* chore(CI): add axon sync workflow by @Simon-Tl in https://github.com/axonweb3/axon/pull/1636


## v0.3.1-beta

### BUG FIXES
* fix(cli): Fix peer id generation by @samtvlabs in https://github.com/axonweb3/axon/pull/1656


## v0.3.0-beta

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "axon"
version = "0.3.0-beta"
version = "0.3.1-beta"
authors = ["Nervos Dev <[email protected]>"]
edition = "2021"
repository = "https://github.com/axonweb3/axon"
Expand Down
2 changes: 1 addition & 1 deletion core/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "core-cli"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
6 changes: 3 additions & 3 deletions core/cli/src/args/generate_keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl GenerateKeypairArgs {
key_pair.bls_private_key.as_bytes(),
i,
)?;
keypairs.push(Keypair::generate(i)?);
keypairs.push(key_pair);
}

println!(
Expand All @@ -64,7 +64,7 @@ pub struct Keypair {
pub net_private_key: Hex,
pub public_key: Hex,
pub address: Address,
pub peer_id: Hex,
pub peer_id: String,
pub bls_private_key: Hex,
pub bls_public_key: Hex,
}
Expand Down Expand Up @@ -94,7 +94,7 @@ impl Keypair {
net_private_key: Hex::encode(&net_seckey),
public_key: Hex::encode(&pubkey),
address: Address::from_pubkey_bytes(pubkey).map_err(Error::Running)?,
peer_id: Hex::encode(secio_keypair.public_key().peer_id().to_base58()),
peer_id: secio_keypair.public_key().peer_id().to_base58(),
bls_private_key: Hex::encode(&bls_seckey),
bls_public_key: Hex::encode(bls_pub_key.to_bytes()),
})
Expand Down
Loading