Skip to content

Conversation

@kaimast
Copy link
Contributor

@kaimast kaimast commented Jan 12, 2026

Motivation

Currently, one can query the connected router peers (through {network}/peers/..) but not validators connected through the gateway.

This PR adds a new set of endpoints {network}/connection/bft/.. and {network}/connections/p2p/... The former allows querying connected validators, while the latter is just an alias for the {network}/peers/.. endpoint.

Test Plan

The new endpoint is used in the sync benchmark to test that validators are fully connected to each other. Successfully running that benchmark validates that the endpoint works as expected.

Backwards compatibility

Initially, I hoped we could just include the validators in the existing peers endpoint, but I added the new endpoints to avoid breaking existing functionality.

Benchmark fixes

Recent changes on staging broke the benchmark workflow. This PR also contains a commit that fixes the workflow.

@kaimast kaimast force-pushed the feat/rest-validator-peers branch from c5bbabf to fa7a220 Compare January 13, 2026 01:25
@kaimast kaimast force-pushed the feat/rest-validator-peers branch from fa7a220 to 21740c3 Compare January 21, 2026 23:33
@kaimast kaimast force-pushed the feat/rest-validator-peers branch 2 times, most recently from 1d84123 to fd760b3 Compare January 26, 2026 02:48
@kaimast kaimast force-pushed the feat/rest-validator-peers branch from fd760b3 to eb0850e Compare January 26, 2026 16:53
@kaimast kaimast marked this pull request as ready for review January 26, 2026 17:39
Copy link

@esren0x esren0x left a comment

Choose a reason for hiding this comment

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

Noticed README also has the list of routes, but not these new ones.
The new ones from a structure POV look good, just noticed a few extra bits when reviewing. And not sure if you guys usually add integration tests for these?

elif (( result < min_peers )); then
log "Node #${node_index} (port=$port) has $result BFT connections, expected at least $min_peers. Will wait and retry..."
else
return 0
Copy link

Choose a reason for hiding this comment

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

I might not have full context, but looks like this return would potentially show a "sucess" even tho it failed. By logging and then returning 0 it would appear to have worked and not get tot he message at the end for

log "❌ BFT connections did not reach $min_peers within 5 minutes."


echo "❌ Benchmark failed! Validators did not sync within 30 minutes."
log "❌ Benchmark failed! Validators did not sync within 30 minutes."
print_client_logs "$log_dir" "$num_validators" "$num_nodes"
Copy link

Choose a reason for hiding this comment

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

Suggested change
print_client_logs "$log_dir" "$num_validators" "$num_nodes"
print_validator_logs "$log_dir" $((num_nodes+1)) 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants