Skip to content

Conversation

jack60612
Copy link
Contributor

Purpose:

Adds a Full Node RPC validation tool that validates the get_block_spends, get_block_spends_with_conditions and get_additions_and_removals endpoints work on all blocks

This PR introduces no breaking changes

Current Behavior:

No tool to test endpoints across all blocks

New Behavior:

There is a tool to test the endpoints across all blocks.

Testing Notes:

Increases code coverage by allowing rpcs to be tested against the real blockchain.

@jack60612 jack60612 self-assigned this Jun 23, 2025
@jack60612 jack60612 added the Added Required label for PR that categorizes merge commit message as "Added" for changelog label Jun 23, 2025
@jack60612
Copy link
Contributor Author

Preliminary AVG time per block is: 0.0015 seconds.

Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at your timings; It would be really nice to have more timing data for these RPCs as well. This can wait for a second PR, but it would be good to determine that the enterprise wallet is not in a dead-end using these RPCs to sync.

renaming, simplifying loading
@jack60612 jack60612 force-pushed the jn.CHIA-2638-validate-full-node-RPCs branch from 69df259 to 113c626 Compare June 25, 2025 15:11
@jack60612
Copy link
Contributor Author

forgot to undraft this

@jack60612 jack60612 marked this pull request as ready for review June 30, 2025 19:43
@jack60612 jack60612 requested a review from a team as a code owner June 30, 2025 19:43
@arvidn
Copy link
Contributor

arvidn commented Jul 1, 2025

@jack60612 When I test this, I get this error:

 python tools/validate_rpcs.py -c 100 -ar --root-path ~/.chia/mainnet/
Exception from 'full_node' 'builtins.BlockRecord' object is not subscriptable:
Traceback (most recent call last):
  File "/home/arvid/dev/3/chia-blockchain/chia/cmds/cmds_util.py", line 132, in get_any_service_client
    yield node_client, config
  File "/home/arvid/dev/3/chia-blockchain/tools/validate_rpcs.py", line 177, in cli_async
    end_height = blockchain_state["peak"]["height"]
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'builtins.BlockRecord' object is not subscriptable

(Pre commit isnt working)
@jack60612
Copy link
Contributor Author

for the record this new code made my ryzen 9 9900x hit 100% cpu, good call @arvidn

@jack60612 jack60612 requested a review from arvidn July 7, 2025 20:07
@arvidn arvidn added the ready_to_merge Submitter and reviewers think this is ready label Jul 9, 2025
@cmmarslender cmmarslender merged commit 5c6c75c into main Jul 10, 2025
362 of 365 checks passed
@cmmarslender cmmarslender deleted the jn.CHIA-2638-validate-full-node-RPCs branch July 10, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Added Required label for PR that categorizes merge commit message as "Added" for changelog ready_to_merge Submitter and reviewers think this is ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants