Useful for debugging and for node operators during setup and evaluating avalanche node health.
Adding this RPC removes the time consuming step of digging through the logs for proofids in
order to evalutate their statuses (valid, conflicting, immature).
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC069441490afd: [avalanche] Add getavalancheproofs RPC to retrieve tracked proof ids
ninja ./test/functional/test_runner.py abc_rpc_getavalancheproofs ./bitcoind -daemon -testnet ./bitcoin-cli -testnet getavalancheinfo
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- rpc-getproofids
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 20207 Build 40099: Build Diff lint-circular-dependencies · build-diff · build-without-wallet · build-clang · build-clang-tidy · build-debug Build 40098: arc lint + arc unit
Event Timeline
Failed tests logs:
====== Bitcoin ABC functional tests: abc_rpc_getavalancheproofs.py ====== ------- Stdout: ------- 2022-09-26T18:29:33.778000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20220926_182323/abc_rpc_getavalancheproofs_204 2022-09-26T18:29:34.367000Z TestFramework (INFO): The test node has no proof 2022-09-26T18:29:34.368000Z TestFramework (INFO): The test node has a proof 2022-09-26T18:29:35.028000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 132, in main self.run_test() File "/work/test/functional/abc_rpc_getavalancheproofs.py", line 80, in run_test "immature": [], AssertionError 2022-09-26T18:29:35.078000Z TestFramework (INFO): Stopping nodes 2022-09-26T18:29:35.279000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20220926_182323/abc_rpc_getavalancheproofs_204 2022-09-26T18:29:35.279000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20220926_182323/abc_rpc_getavalancheproofs_204/test_framework.log 2022-09-26T18:29:35.280000Z TestFramework (ERROR): 2022-09-26T18:29:35.280000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20220926_182323/abc_rpc_getavalancheproofs_204' to consolidate all logs 2022-09-26T18:29:35.280000Z TestFramework (ERROR): 2022-09-26T18:29:35.280000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log. 2022-09-26T18:29:35.280000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues 2022-09-26T18:29:35.280000Z TestFramework (ERROR):
Each failure log is accessible here:
Bitcoin ABC functional tests: abc_rpc_getavalancheproofs.py
doc/release-notes.md | ||
---|---|---|
16 ↗ | (On Diff #35196) | Needs rebase |
src/rpc/avalanche.cpp | ||
956 ↗ | (On Diff #35196) | Unrelated but we need to factor this, it's duplicated over every RPC |
961–980 ↗ | (On Diff #35196) | |
1316 ↗ | (On Diff #35196) | getavalancheproofids ? |
test/functional/abc_rpc_getavalancheproofs.py | ||
63 ↗ | (On Diff #35196) | not needed |
136 ↗ | (On Diff #35196) | You might want to assert that ready_to_poll is true at this point |
172 ↗ | (On Diff #35196) | This is not very useful since you already have the status via the RPC, asserting the logs should be a last resort rather than an expectation |
180 ↗ | (On Diff #35196) | Suggestion: mine a block and check the immature goes into valid. |
Will work on the remaining feedback.
src/rpc/avalanche.cpp | ||
---|---|---|
956 ↗ | (On Diff #35196) | Agreed. I briefly looked into this but discovered that some RPCs need more attention than simply refactoring this check. Some would benefit from checking that avalanche is actually enabled, not just initialized. I didn't have time to dig into details yet. |
1316 ↗ | (On Diff #35196) | I considered this. The RPC naming is a little strange since it does not match the code 1 to 1. To fetch an object, it's always getraw<object> and RPCs that return ids do not have that in the name. The only benefit I can see from this is getavalancheproofs could later have a verbose flag to return full objects and the name would still make sense. This will not make sense with getavalancheproofids. |
doc/release-notes.md | ||
---|---|---|
10 | Make a full sentence: |