autonity / docs.autonity.org

Documentation for the Autonity Go Client (AGC)
https://docs.autonity.org
2 stars 5 forks source link

Concept Validator: update legacy command-line flag name `genEnodeProof` to `genOwnershipProof` #173

Closed cmjc closed 2 months ago

cmjc commented 5 months ago

Describe the bug

The Concept Validator page has in section P2P node keys: autonityKeys an instance of the legacy name for the genOwnershipProof command-line option of genEnodeProof. This needs correcting to genOwnershipProof.

To generate the proof of enode ownership required for validator registration. The proof is generated using the genEnodeProof command-line option of the Autonity Go Client.

Also, the notebox below refers to using the bootnode utility to generate the enode url

::: {.callout-note title="Note" collapse="false"}
The private key can be used by Autonity’s `bootnode` utility to derive the hex string used in the `enode` URL. (See Networking Options  `nodekey` and `nodekeyhex` in [Autonity command-line options](/reference/cli/#usage) and, for reference,  the ethereum stack exchange article [how to produce enode from node key](https://ethereum.stackexchange.com/questions/28970/how-to-produce-enode-from-node-key).)
:::

This should be updated to clarify that the first 64 characters of the private key in the autonitykeys file needs to be passed in as argument else it will fail (autonitykeys is 128 as it contains node key concatenated withconsensus key)

Tasks

E.g.

Extract the node key from your autonitykeys file:

head -c 64 <DIR_PATH>/autonitykeys

where <DIR_PATH> is the path to your autonitykeys file.

This will print the private node key from the autonitykeys file to terminal.

This can then be passed in as the value to the the bootnode utility's -hodekey flag or placed in a file and the file passed in as the value to the -nodekeyhex flag.

cmjc commented 5 months ago

On the notebox:

::: {.callout-note title="Note" collapse="false"}
The private key can be used by Autonity’s `bootnode` utility to derive the hex string used in the `enode` URL. (See Networking Options  `nodekey` and `nodekeyhex` in [Autonity command-line options](/reference/cli/#usage) and, for reference,  the ethereum stack exchange article [how to produce enode from node key](https://ethereum.stackexchange.com/questions/28970/how-to-produce-enode-from-node-key).)
:::

This is legacy now. Removing and replacing with:

::: {.callout-tip title="Viewing the node and consensus public keys with `autinspect`" collapse="true"}

The node and consensus public keys can be viewed using Autonity's `ethkey` cmd utility and the `autinspect` command to sinspect the `autonitykeys` file:

./build/bin/ethkey autinspect


The command will return the `Node Address`, `Node Public Key` and `Consensus Public Key` of the node.

For example:

Node Address: 0x550454352B8e1EAD5F27Cce108EF59439B18E249 Node Public Key: 0xcef6334d0855b72dadaa923ceae532550ef68e0ac50288a393eda5d811b9e81053e1324e637a202e21d04e301fe1765900bdd9f3873d58a2badf693331cb1b15 Consensus Public Key: 0x1aa83a28e235072ffdae41fg01ccc46e2b8d9dc16df3b6ff87ffa5ff6d7f90a2852649a60563237cd66a256f60a92e71


Note that (a) the `Node public key` value minus the leading `0x` marker of the HEX string is the public key component of your [validator enode url](/concepts/validator/#validator-enode-url), and, (b) the `Node Address` value is the [validator identifier address](/concepts/validator/#validator-identifier).

:::
cmjc commented 5 months ago

Addressed by PR #199