darkfid|drk|minerd: use the new Address format everywhere + minor cleanups and docs updates

This commit is contained in:
skoupidi
2025-12-16 20:31:01 +02:00
parent d5be2cf726
commit ffd1964254
30 changed files with 265 additions and 219 deletions

View File

@@ -185,11 +185,11 @@ Set it as the default one in the wallet and grab its secret key:
```shell
drk> wallet addresses
Key ID | Public Key | Secret Key | Is Default
-----------------------+------------------+-----------------------------+------------
1 | {NORMAL_ADDRESS} | {NORMAL_ADDRESS_SECRET_KEY} | *
Key ID | Address | Public Key | Secret Key | Is Default
-----------------------+------------------+-----------------------------+-----------------------------+------------
1 | {NORMAL_ADDRESS} | {NORMAL_ADDRESS_PUBLIC_KEY} | {NORMAL_ADDRESS_SECRET_KEY} | *
...
{DUMMY_ADDRESS_INDEX} | {DUMMY_ADDRESS} | {DUMMY_ADDRESS_SECRET_KEY} |
{DUMMY_ADDRESS_INDEX} | {DUMMY_ADDRESS} | {DUMMY_ADDRESS_PUBLIC_KEY} | {DUMMY_ADDRESS_SECRET_KEY} |
drk> wallet default-address {DUMMY_ADDRESS_INDEX}
```

View File

@@ -725,7 +725,7 @@ configuration, execute:
drk> dao mining-config {YOUR_DAO}
DarkFi TOML configuration:
recipient = "{YOUR_DAO_NOTES_PUBLIC_KEY}"
recipient = "{YOUR_DAO_WALLET_ADDRESS}"
spend_hook = "{DAO_CONTRACT_SPEND_HOOK}"
user_data = "{YOUR_DAO_BULLA}"
@@ -738,8 +738,8 @@ corresponding fields(uncomment if needed) as per retrieved
configuration:
```toml
# Put your DAO notes public key here
recipient = "{YOUR_DAO_NOTES_PUBLIC_KEY}"
# Put your DAO wallet address here
recipient = "{YOUR_DAO_WALLET_ADDRESS}"
# Put the DAO contract spend hook here
spend_hook = "{DAO_CONTRACT_SPEND_HOOK}"

View File

@@ -191,6 +191,12 @@ or press `p` to pause mining.
## p2pool setup with merge-mining
> NOTE: `p2pool` uses plain `http` connections for RPC calls, as its
> assumed to be running on a localnet. Don't run a `p2pool` instance
> with a `darkfid` instance outside of your network, since someone
> snooping your traffic can see your wallet address used for the block
> rewards.
Now that everything is in order, we can use `p2pool` with merge-mining
enabled in order to merge mine DarkFi. For receiving mining rewards
on DarkFi, we'll need a DarkFi wallet address so make sure you have
@@ -244,7 +250,7 @@ To retrieve a DAO merge mining configuration, execute:
drk> dao mining-config {YOUR_DAO}
DarkFi TOML configuration:
recipient = "{YOUR_DAO_NOTES_PUBLIC_KEY}"
recipient = "{YOUR_DAO_WALLET_ADDRESS}"
spend_hook = "{DAO_CONTRACT_SPEND_HOOK}"
user_data = "{YOUR_DAO_BULLA}"

View File

@@ -167,7 +167,7 @@ $ ./drk wallet keygen
Generating a new keypair
New address:
CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf
```
```shell
@@ -181,7 +181,7 @@ retrieve your default address using:
```shell
$ ./drk wallet address
CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf
```
### Miner
@@ -244,12 +244,19 @@ You can retrieve your `drk` wallet address as follows:
```shell
$ ./drk wallet address
CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf
```
Note: when modifying the `minerd` config file to use with the
testnet, be sure to change the values under the section marked
`[network_config."testnet"]` (not localnet or mainnet!).
> Notes:
>
> When modifying the `minerd` config file to use with the
> testnet, be sure to change the values under the section marked
> `[network_config."testnet"]` (not localnet or mainnet!).
>
> If you are not on the same network as the `darkfid` instance you
> are using, you must configure and use `tcp+tls` for the RPC
> endpoints, so your traffic is not plaintext, as it contains your
> wallet address used for the block rewards.
Once that's in place, you can run it again and `minerd` will start,
polling `darkfid` for new block headers to mine.

View File

@@ -3,10 +3,10 @@
Using the tokens we minted, we can make payments to other addresses.
We will use a dummy recepient, but you can also test this with friends.
Let's try to send some `ANON` tokens to
`8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`:
`DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf`:
```shell
drk> transfer 2.69 ANON 8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj | broadcast
drk> transfer 2.69 ANON DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf | broadcast
[mark_tx_spend] Processing transaction: 47b4818caec22470427922f506d72788233001a79113907fd1a93b7756b07395
[mark_tx_spend] Found Money contract in call 0
@@ -16,8 +16,9 @@ Transaction ID: 47b4818caec22470427922f506d72788233001a79113907fd1a93b7756b07395
```
On success we'll see a transaction ID. Now again the same confirmation
process has to occur and `8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`
will receive the tokens you've sent.
process has to occur and
`DZnsGMCvZU5CEzvpuExnxbvz6SEhE2rn89sMcuHsppFE6TjL4SBTrKkf` will receive
the tokens you've sent.
![pablo-waiting1](img/pablo1.jpg)