planetarium / planet-node

A simple node implementation using Libplanet
GNU Affero General Public License v3.0
7 stars 13 forks source link

Add Sync to Peer to use PeerStrings Configuration.PeerStrings #24

Closed sensecodevalue closed 2 years ago

sensecodevalue commented 2 years ago

solved #12

Changes

description

  1. Excute root peer node
    PN_StorePath=/tmp/planet-node-chain dotnet run --project PlanetNode
  2. Copy root chain for using same genesis block & Setting peer node chain
    cp -r /tmp/planet-node-chain /tmp/planet-node-a
  3. Copy peerString of root peer node & Paste to PeerStrings of appsettings.peer.json
  4. Excute peer node
    PN_StorePath=/tmp/planet-node-chain-a PN_CONFIG_FILE=appsettings.peer.json  dotnet run --project PlanetNode
  5. Create transaction in peer node & Check at root node
    
    dotnet run --project PlanetNode -- key
    #Key ID                               Address                                   
    #------------------------------------ ------------------------------------------
    #b53ba868-4749-49d3-b2aa-2433a507370b 0x50129015Fa9F02AE2db055d4C675E42f5Ec82066
    #62ca49b2-999b-4459-a9a9-6fb64317864c 0xBc35F4797514e6f13736e6C6777BAea4764B0526
    #9f5a70fd-b9b2-415f-8ff2-eb64cc7629f7 0x917955C717b82801479e43732BD9b3c6710e5000
    #66aa63b4-048a-43f7-a747-e769bf861f36 0xBd04842e6Bee1b6399F143D2CeB65EAE8f7ee453

dotnet run --project PlanetNode -- key export 62ca49b2-999b-4459-a9a9-6fb64317864c

Passphrase (of 62ca49b2-999b-4459-a9a9-6fb64317864c):

543140f03e7294eea41c67efbcca6f20c2f557e0a6101f8a6935ffc0aec9bcae


- peerNode GraphQL Mutation | http://localhost:308081/ui/playground
```graphql
mutation
{
  transferAsset(
    recipient: "917955C717b82801479e43732BD9b3c6710e5000"
    amount: "50"
    privateKeyHex: "543140f03e7294eea41c67efbcca6f20c2f557e0a6101f8a6935ffc0aec9bcae"
  )
  {
    id
  }
}
// mutation result
{
  "data": {
    "transferAsset": {
      "id": "d9a5d7638350f3b38cde81772f7bf147ac67a73b20893922ae89ddaeb52c246f"
    }
  }
}

dependence

<PackageReference Include="Serilog.Expressions" Version="3.4.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />   
pull-request-quantifier-deprecated[bot] commented 2 years ago

This PR has 147 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

``` Label : Medium Size : +137 -10 Percentile : 49.4% Total files changed: 7 Change summary by file extension: .cs : +18 -3 .csproj : +3 -0 .json : +116 -7 ``` > Change counts above are quantified counts, based on the [PullRequestQuantifier customizations](https://github.com/microsoft/PullRequestQuantifier/blob/main/docs/prquantifier-yaml.md).

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a balance between between PR complexity and PR review overhead. PRs within the optimal size (typical small, or medium sized PRs) mean: - Fast and predictable releases to production: - Optimal size changes are more likely to be reviewed faster with fewer iterations. - Similarity in low PR complexity drives similar review times. - Review quality is likely higher as complexity is lower: - Bugs are more likely to be detected. - Code inconsistencies are more likely to be detected. - Knowledge sharing is improved within the participants: - Small portions can be assimilated better. - Better engineering practices are exercised: - Solving big problems by dividing them in well contained, smaller problems. - Exercising separation of concerns within the code changes. #### What can I do to optimize my changes - Use the PullRequestQuantifier to quantify your PR accurately - Create a context profile for your repo using the [context generator](https://github.com/microsoft/PullRequestQuantifier/releases) - Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the `Excluded` section from your `prquantifier.yaml` context profile. - Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your `prquantifier.yaml` context profile. - Only use the labels that matter to you, [see context specification](./docs/prquantifier-yaml.md) to customize your `prquantifier.yaml` context profile. - Change your engineering behaviors - For PRs that fall outside of the desired spectrum, review the details and check if: - Your PR could be split in smaller, self-contained PRs instead - Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR). #### How to interpret the change counts in git diff output - One line was added: `+1 -0` - One line was deleted: `+0 -1` - One line was modified: `+1 -1` (git diff doesn't know about modified, it will interpret that line like one addition plus one deletion) - Change percentiles: Change characteristics (addition, deletion, modification) of this PR in relation to all other PRs within the repository.


Was this comment helpful? :thumbsup:  :ok_hand:  :thumbsdown: (Email) Customize PullRequestQuantifier for this repository.