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 #1656

Merged

Conversation

distributedstatemachine
Copy link
Collaborator

What this PR does / why we need it?

This PR fixes a bug in the key generation , where peer_id is hex encoded.

What is the impact of this PR?

Before

/axon$ ./target/release/axon generate-keypair -n 1 -p .
{
  "keypairs": [
    {
      "index": 0,
      "net_private_key": "0x3e7ee435ec780adc22913cf43dcf81849596e66436d6ea92473b5aa38ce59355",
      "public_key": "0x02817154cbb0946980b352378b7366fc86dff6ca5f71a3c3767accd4d35481aa16",
      "address": "0x1F781E1FA61dce22A256873Af1E4066D6f2Db042",
      "peer_id": "0x516d5475796e324b445a66685271665763666f79656a424e53737554414b75567432616a6e4d6331524858664737",
      "bls_private_key": "0x72e19bff8b6a260ff33c57fede34d3ff5cad1891f48674db952413f45324da07",
      "bls_public_key": "0x9688b98d4c203d42e0d73b7bd233c5e73b5a92804fc7ac5446ee80d9758d0da9f6250fea030377a697e29059c0e98f29"
    }
  ]
}

After

 ./target/release/axon generate-keypair -n 1 -p . | grep peer_id
      "peer_id": "QmS93dMohH8pvvV9ULSGSX7YmPuEbx7gr29Qfyfp1Ch5KA",

No Breaking Change

PR relation:

  • Ref #
CI Settings

CI Usage

Tip: Check the CI you want to run below, and then comment /run-ci.

CI Switch

  • Web3 Compatible Tests
  • OpenZeppelin tests
  • v3 Core Tests

CI Description

CI Name Description
Web3 Compatible Test Test the Web3 compatibility of Axon
v3 Core Test Run the compatibility tests provided by Uniswap V3
OpenZeppelin tests Run the compatibility tests provided by OpenZeppelin, including OCT 1-5 | 6-10 | 11 | 12-15 | 16-19

@distributedstatemachine distributedstatemachine requested a review from a team as a code owner January 10, 2024 14:32
@distributedstatemachine distributedstatemachine changed the base branch from main to dev January 10, 2024 14:55
@distributedstatemachine distributedstatemachine changed the base branch from dev to 0.3.0-alpha January 10, 2024 14:56
@distributedstatemachine distributedstatemachine changed the base branch from 0.3.0-alpha to main January 10, 2024 14:56
@Flouse Flouse changed the base branch from main to 0.3.x-dev January 11, 2024 02:28
Flouse and others added 2 commits January 11, 2024 02:39
Update setup.js
Update web3_clientVersion.test.js

(cherry picked from commit 83ad796)
@Flouse Flouse mentioned this pull request Jan 11, 2024
3 tasks
@Flouse Flouse changed the title Fix/peer id generation fix(cli): Fix peer id generation Jan 11, 2024
@Flouse Flouse merged commit b4054ec into axonweb3:0.3.x-dev Jan 11, 2024
14 of 15 checks passed
Flouse added a commit that referenced this pull request Jan 11, 2024
**PR relation**:
- #1656
  by @samtvlabs

### What is the impact of this PR?

No Breaking Change
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.

3 participants