Page MenuHomePhabricator

Add miner fund address list to getblocktemplate output
ClosedPublic

Authored by jasonbcox on Aug 20 2020, 23:13.

Details

Summary

This sets a handy field for fetching valid infrastructure funding addresses.

coinbasetxn is currently unused by mining pools as it is not generated by bitcoind.
In practice, the coinbase transaction is set by the pool software instead of being fetched
from the node.

Should the pool software happen to examine coinbasetxn, this change does not interfere with
expected fields as defined in the BIP22 Spec.

Depends on D7233, D7272

Test Plan
test_runner.py abc_mining_basic abc-magnetic-anomaly-mining mining_basic
test_runner.py --with-axionactivation abc_mining_basic abc-magnetic-anomaly-mining mining_basic

Diff Detail

Repository
rABC Bitcoin ABC
Branch
gbt-minerfund
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 12452
Build 25065: Build Diffbuild-without-wallet · build-clang-10 · build-diff · build-clang-tidy
Build 25064: arc lint + arc unit

Event Timeline

jasonbcox planned changes to this revision.
jasonbcox edited the summary of this revision. (Show Details)

Snippet of first build failure:

[317/373] bitcoin: testing policyestimator_tests
[318/373] Running utility command for check-bitcoin-timedata_tests
[319/373] Running utility command for check-bitcoin-streams_tests
[320/373] Running utility command for check-bitcoin-policyestimator_tests
[321/373] bitcoin: testing checkdatasig_tests
[322/373] Running utility command for check-bitcoin-checkdatasig_tests
[323/373] bitcoin: testing uint256_tests
[324/373] Running utility command for check-bitcoin-uint256_tests
[325/373] bitcoin: testing serialize_tests
[326/373] Running utility command for check-bitcoin-serialize_tests
[327/373] bitcoin: testing checkpoints_tests
[328/373] Running utility command for check-bitcoin-checkpoints_tests
[329/373] bitcoin: testing blockcheck_tests
[330/373] bitcoin: testing validationinterface_tests
[331/373] Running utility command for check-bitcoin-blockcheck_tests
[332/373] Running utility command for check-bitcoin-validationinterface_tests
[333/373] bitcoin: testing sigencoding_tests
[334/373] Running utility command for check-bitcoin-sigencoding_tests
[335/373] bitcoin: testing script_standard_tests
[336/373] bitcoin: testing crypto_tests
[337/373] bitcoin: testing radix_tests
[338/373] Running utility command for check-bitcoin-script_standard_tests
[339/373] Running utility command for check-bitcoin-crypto_tests
[340/373] Running utility command for check-bitcoin-radix_tests
[341/373] bitcoin: testing txvalidation_tests
[342/373] Running utility command for check-bitcoin-txvalidation_tests
[343/373] bitcoin: testing cashaddr_tests
[344/373] bitcoin: testing validation_block_tests
[345/373] bitcoin: testing getarg_tests
[346/373] Running utility command for check-bitcoin-cashaddr_tests
[347/373] Running utility command for check-bitcoin-validation_block_tests
[348/373] Running utility command for check-bitcoin-getarg_tests
[349/373] bitcoin: testing script_tests
[350/373] Running utility command for check-bitcoin-script_tests
[351/373] bitcoin: testing bswap_tests
[352/373] Running utility command for check-bitcoin-bswap_tests
[353/373] bitcoin: testing versionbits_tests
[354/373] bitcoin: testing hash_tests
[355/373] bitcoin: testing validation_tests
[356/373] Running utility command for check-bitcoin-versionbits_tests
[357/373] Running utility command for check-bitcoin-validation_tests
[358/373] Running utility command for check-bitcoin-hash_tests
[359/373] bitcoin: testing monolith_opcodes_tests
[360/373] Running utility command for check-bitcoin-monolith_opcodes_tests
[361/373] bitcoin: testing skiplist_tests
[362/373] Running utility command for check-bitcoin-skiplist_tests
[363/373] bitcoin: testing util_tests
[364/373] Running utility command for check-bitcoin-util_tests
[365/373] bitcoin: testing cuckoocache_tests
[366/373] Running utility command for check-bitcoin-cuckoocache_tests
[367/373] bitcoin: testing op_reversebytes_tests
[368/373] Running utility command for check-bitcoin-op_reversebytes_tests
[369/373] bitcoin: testing coins_tests
[370/373] Running utility command for check-bitcoin-coins_tests
[371/373] bitcoin: testing transaction_tests
[372/373] Running utility command for check-bitcoin-transaction_tests
[373/373] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Each failure log is accessible here:
Bitcoin ABC functional tests: mining_basic.py

Snippet of first build failure:

rpc_misc.py                             | ✓ Passed  | 1 s
rpc_named_arguments.py                  | ✓ Passed  | 1 s
rpc_net.py                              | ✓ Passed  | 1 s
rpc_preciousblock.py                    | ✓ Passed  | 1 s
rpc_psbt.py                             | ✓ Passed  | 21 s
rpc_rawtransaction.py                   | ✓ Passed  | 40 s
rpc_scantxoutset.py                     | ✓ Passed  | 4 s
rpc_setban.py                           | ✓ Passed  | 2 s
rpc_signmessage.py                      | ✓ Passed  | 1 s
rpc_signrawtransaction.py               | ✓ Passed  | 1 s
rpc_txoutproof.py                       | ✓ Passed  | 2 s
rpc_uptime.py                           | ✓ Passed  | 1 s
rpc_users.py                            | ✓ Passed  | 2 s
rpc_whitelist.py                        | ✓ Passed  | 1 s
tool_wallet.py                          | ✓ Passed  | 3 s
wallet_abandonconflict.py               | ✓ Passed  | 12 s
wallet_address_types.py                 | ✓ Passed  | 16 s
wallet_avoidreuse.py                    | ✓ Passed  | 3 s
wallet_backup.py                        | ✓ Passed  | 44 s
wallet_balance.py                       | ✓ Passed  | 39 s
wallet_basic.py                         | ✓ Passed  | 22 s
wallet_create_tx.py                     | ✓ Passed  | 5 s
wallet_createwallet.py                  | ✓ Passed  | 3 s
wallet_createwallet.py --usecli         | ✓ Passed  | 3 s
wallet_disable.py                       | ✓ Passed  | 0 s
wallet_dump.py                          | ✓ Passed  | 3 s
wallet_encryption.py                    | ✓ Passed  | 5 s
wallet_groups.py                        | ✓ Passed  | 12 s
wallet_hd.py                            | ✓ Passed  | 5 s
wallet_import_rescan.py                 | ✓ Passed  | 4 s
wallet_import_with_label.py             | ✓ Passed  | 1 s
wallet_importmulti.py                   | ✓ Passed  | 3 s
wallet_importprunedfunds.py             | ✓ Passed  | 2 s
wallet_keypool.py                       | ✓ Passed  | 3 s
wallet_keypool_topup.py                 | ✓ Passed  | 2 s
wallet_labels.py                        | ✓ Passed  | 1 s
wallet_listreceivedby.py                | ✓ Passed  | 26 s
wallet_listsinceblock.py                | ✓ Passed  | 3 s
wallet_listtransactions.py              | ✓ Passed  | 9 s
wallet_multiwallet.py                   | ✓ Passed  | 43 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 19 s
wallet_reorgsrestore.py                 | ✓ Passed  | 3 s
wallet_resendwallettransactions.py      | ✓ Passed  | 4 s
wallet_txn_clone.py                     | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
wallet_txn_doublespend.py               | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 3 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 1 s
wallet_zapwallettxes.py                 | ✓ Passed  | 3 s
abc-magnetic-anomaly-mining.py          | ✖ Failed  | 1 s
mining_basic.py                         | ✖ Failed  | 1 s

ALL                                     | ✖ Failed  | 830 s (accumulated) 
Runtime: 166 s

FAILED: test/CMakeFiles/check-functional-upgrade-activated 
cd /work/abc-ci-builds/build-diff/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-diff/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-diff/test/log && /usr/bin/cmake -E env /usr/bin/python3.7 ./functional/test_runner.py "--testsuitename=Bitcoin ABC functional tests with the next upgrade activated" --junitoutput=/work/abc-ci-builds/build-diff/test/junit/functional_tests_with_the_next_upgrade_activated.xml --with-axionactivation
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Each failure log is accessible here:
Bitcoin ABC functional tests: abc-magnetic-anomaly-mining.py
Bitcoin ABC functional tests: mining_basic.py
Bitcoin ABC functional tests: rpc_bind.py
Bitcoin ABC functional tests with the next upgrade activated: abc-magnetic-anomaly-mining.py
Bitcoin ABC functional tests with the next upgrade activated: mining_basic.py

Fabien requested changes to this revision.Aug 21 2020, 06:39
Fabien added a subscriber: Fabien.

Please investigate the test failures

This revision now requires changes to proceed.Aug 21 2020, 06:39
deadalnix requested changes to this revision.Aug 22 2020, 12:25
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/rpc/mining.cpp
669

You might want to add the amount while you are at it.

This revision now requires changes to proceed.Aug 22 2020, 12:25
  • Added miner fund value
  • Made the fund information a JSON object, containing addresses and minimumvalue
  • Added missing help text
deadalnix requested changes to this revision.Aug 28 2020, 17:31
deadalnix added inline comments.
src/rpc/mining.cpp
682 ↗(On Diff #23053)

Repeating that calculation everywhere is not a good strategy.

This revision now requires changes to proceed.Aug 28 2020, 17:31

Rebase on D7272 to address feedback

This revision is now accepted and ready to land.Aug 31 2020, 16:21