Skip to content

test: multi node daemon test updates#792

Open
sugh01 wants to merge 2 commits intobsv-blockchain:mainfrom
sugh01:multi-node-test-daemon
Open

test: multi node daemon test updates#792
sugh01 wants to merge 2 commits intobsv-blockchain:mainfrom
sugh01:multi-node-test-daemon

Conversation

@sugh01
Copy link
Copy Markdown
Collaborator

@sugh01 sugh01 commented Apr 30, 2026

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

🤖 Claude Code Review

Status: Complete


Current Review:

This PR adds multi-node test infrastructure for daemon-based E2E testing. The changes appear well-structured and follow good test practices.

Minor observation:

  • The new exported GetFreePort() function in daemon/test_daemon.go:793 duplicates logic from test/longtest/util/kafka/kafka_test.go:764. While the daemon version is simpler (direct wrapper), the kafka version includes retry logic. Consider consolidating these implementations in a shared test utility package if this pattern expands further.

No critical issues found. The test scenarios are comprehensive and well-documented.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Benchmark Comparison Report

Baseline: main (unknown)

Current: PR-792 (a979b93)

Summary

  • Regressions: 0
  • Improvements: 0
  • Unchanged: 140
  • Significance level: p < 0.05
All benchmark results (sec/op)
Benchmark Baseline Current Change p-value
_NewBlockFromBytes-4 1.706µ 1.670µ ~ 0.100
SplitSyncedParentMap_SetIfNotExists/256_buckets-4 61.47n 61.60n ~ 0.500
SplitSyncedParentMap_SetIfNotExists/16_buckets-4 61.47n 62.02n ~ 0.200
SplitSyncedParentMap_SetIfNotExists/1_bucket-4 61.53n 61.51n ~ 1.000
SplitSyncedParentMap_ConcurrentSetIfNotExists/256_buckets... 30.51n 31.09n ~ 0.200
SplitSyncedParentMap_ConcurrentSetIfNotExists/16_buckets_... 54.02n 53.63n ~ 0.700
SplitSyncedParentMap_ConcurrentSetIfNotExists/1_bucket_pa... 116.8n 113.0n ~ 0.200
MiningCandidate_Stringify_Short-4 263.5n 262.1n ~ 0.100
MiningCandidate_Stringify_Long-4 1.916µ 1.910µ ~ 0.100
MiningSolution_Stringify-4 983.5n 979.5n ~ 0.100
BlockInfo_MarshalJSON-4 1.771µ 1.771µ ~ 1.000
NewFromBytes-4 128.4n 129.2n ~ 0.800
Mine_EasyDifficulty-4 64.68µ 64.50µ ~ 0.700
Mine_WithAddress-4 5.313µ 4.828µ ~ 0.100
DirectSubtreeAdd/4_per_subtree-4 63.14n 62.96n ~ 1.000
DirectSubtreeAdd/64_per_subtree-4 28.65n 29.13n ~ 0.200
DirectSubtreeAdd/256_per_subtree-4 27.54n 27.95n ~ 0.700
DirectSubtreeAdd/1024_per_subtree-4 26.38n 26.53n ~ 0.300
DirectSubtreeAdd/2048_per_subtree-4 26.00n 26.06n ~ 1.000
SubtreeProcessorAdd/4_per_subtree-4 336.6n 319.0n ~ 0.100
SubtreeProcessorAdd/64_per_subtree-4 327.5n 313.8n ~ 0.100
SubtreeProcessorAdd/256_per_subtree-4 319.7n 316.4n ~ 1.000
SubtreeProcessorAdd/1024_per_subtree-4 316.0n 316.1n ~ 0.700
SubtreeProcessorAdd/2048_per_subtree-4 317.1n 313.9n ~ 0.700
SubtreeProcessorRotate/4_per_subtree-4 321.9n 313.9n ~ 0.100
SubtreeProcessorRotate/64_per_subtree-4 320.1n 316.9n ~ 0.700
SubtreeProcessorRotate/256_per_subtree-4 320.3n 318.4n ~ 0.700
SubtreeProcessorRotate/1024_per_subtree-4 308.6n 306.6n ~ 1.000
SubtreeNodeAddOnly/4_per_subtree-4 67.54n 67.43n ~ 0.700
SubtreeNodeAddOnly/64_per_subtree-4 39.12n 39.35n ~ 0.700
SubtreeNodeAddOnly/256_per_subtree-4 37.82n 38.53n ~ 0.400
SubtreeNodeAddOnly/1024_per_subtree-4 37.10n 38.29n ~ 0.100
SubtreeCreationOnly/4_per_subtree-4 165.9n 163.6n ~ 0.100
SubtreeCreationOnly/64_per_subtree-4 671.6n 643.5n ~ 1.000
SubtreeCreationOnly/256_per_subtree-4 2.032µ 2.057µ ~ 1.000
SubtreeCreationOnly/1024_per_subtree-4 5.159µ 5.048µ ~ 1.000
SubtreeCreationOnly/2048_per_subtree-4 9.178µ 8.942µ ~ 1.000
SubtreeProcessorOverheadBreakdown/64_per_subtree-4 306.7n 309.8n ~ 0.200
SubtreeProcessorOverheadBreakdown/1024_per_subtree-4 313.3n 310.5n ~ 0.400
ParallelGetAndSetIfNotExists/1k_nodes-4 989.7µ 974.5µ ~ 0.200
ParallelGetAndSetIfNotExists/10k_nodes-4 1.967m 1.979m ~ 1.000
ParallelGetAndSetIfNotExists/50k_nodes-4 8.730m 8.828m ~ 0.200
ParallelGetAndSetIfNotExists/100k_nodes-4 17.64m 18.00m ~ 0.100
SequentialGetAndSetIfNotExists/1k_nodes-4 774.2µ 769.8µ ~ 0.700
SequentialGetAndSetIfNotExists/10k_nodes-4 3.000m 3.315m ~ 0.100
SequentialGetAndSetIfNotExists/50k_nodes-4 10.92m 12.00m ~ 0.100
SequentialGetAndSetIfNotExists/100k_nodes-4 20.80m 22.22m ~ 0.100
ProcessOwnBlockSubtreeNodesParallel/1k_nodes-4 1.037m 1.032m ~ 0.700
ProcessOwnBlockSubtreeNodesParallel/10k_nodes-4 4.786m 5.001m ~ 0.100
ProcessOwnBlockSubtreeNodesParallel/100k_nodes-4 19.27m 20.04m ~ 0.100
ProcessOwnBlockSubtreeNodesSequential/1k_nodes-4 848.7µ 855.7µ ~ 0.400
ProcessOwnBlockSubtreeNodesSequential/10k_nodes-4 6.228m 6.794m ~ 0.100
ProcessOwnBlockSubtreeNodesSequential/100k_nodes-4 40.59m 43.66m ~ 0.100
DiskTxMap_SetIfNotExists-4 3.948µ 4.036µ ~ 1.000
DiskTxMap_SetIfNotExists_Parallel-4 4.258µ 3.924µ ~ 0.100
DiskTxMap_ExistenceOnly-4 383.9n 368.3n ~ 0.700
Queue-4 204.8n 206.6n ~ 0.700
AtomicPointer-4 4.555n 4.457n ~ 0.400
ReorgOptimizations/DedupFilterPipeline/Old/10K-4 920.9µ 980.6µ ~ 0.100
ReorgOptimizations/DedupFilterPipeline/New/10K-4 877.7µ 864.8µ ~ 0.700
ReorgOptimizations/AllMarkFalse/Old/10K-4 128.4µ 126.7µ ~ 1.000
ReorgOptimizations/AllMarkFalse/New/10K-4 62.31µ 62.37µ ~ 0.400
ReorgOptimizations/HashSlicePool/Old/10K-4 71.70µ 61.17µ ~ 0.100
ReorgOptimizations/HashSlicePool/New/10K-4 11.68µ 11.37µ ~ 0.100
ReorgOptimizations/NodeFlags/Old/10K-4 6.795µ 6.134µ ~ 0.100
ReorgOptimizations/NodeFlags/New/10K-4 2.330µ 2.215µ ~ 0.100
ReorgOptimizations/DedupFilterPipeline/Old/100K-4 12.48m 12.68m ~ 1.000
ReorgOptimizations/DedupFilterPipeline/New/100K-4 13.09m 10.73m ~ 0.100
ReorgOptimizations/AllMarkFalse/Old/100K-4 1.248m 1.131m ~ 0.100
ReorgOptimizations/AllMarkFalse/New/100K-4 688.2µ 684.9µ ~ 0.400
ReorgOptimizations/HashSlicePool/Old/100K-4 664.8µ 655.7µ ~ 0.700
ReorgOptimizations/HashSlicePool/New/100K-4 315.3µ 320.8µ ~ 1.000
ReorgOptimizations/NodeFlags/Old/100K-4 58.07µ 57.73µ ~ 1.000
ReorgOptimizations/NodeFlags/New/100K-4 19.72µ 20.59µ ~ 0.700
TxMapSetIfNotExists-4 52.36n 52.23n ~ 1.000
TxMapSetIfNotExistsDuplicate-4 38.32n 38.15n ~ 0.700
ChannelSendReceive-4 609.0n 614.1n ~ 0.200
BlockAssembler_AddTx-4 0.03086n 0.02724n ~ 0.400
AddNode-4 10.70 10.73 ~ 1.000
AddNodeWithMap-4 11.11 10.40 ~ 0.700
CalcBlockWork-4 465.9n 469.7n ~ 0.200
CalculateWork-4 673.8n 624.2n ~ 0.700
BuildBlockLocatorString_Helpers/Size_10-4 1.308µ 1.315µ ~ 0.100
BuildBlockLocatorString_Helpers/Size_100-4 12.42µ 12.50µ ~ 0.400
BuildBlockLocatorString_Helpers/Size_1000-4 138.0µ 143.3µ ~ 1.000
CatchupWithHeaderCache-4 104.2m 104.1m ~ 0.400
_BufferPoolAllocation/16KB-4 3.653µ 3.439µ ~ 0.100
_BufferPoolAllocation/32KB-4 9.352µ 7.119µ ~ 0.100
_BufferPoolAllocation/64KB-4 16.73µ 18.39µ ~ 0.700
_BufferPoolAllocation/128KB-4 34.37µ 31.15µ ~ 0.100
_BufferPoolAllocation/512KB-4 121.7µ 114.2µ ~ 0.100
_BufferPoolConcurrent/32KB-4 20.46µ 20.36µ ~ 0.100
_BufferPoolConcurrent/64KB-4 31.85µ 31.43µ ~ 0.400
_BufferPoolConcurrent/512KB-4 157.9µ 148.5µ ~ 0.100
_SubtreeDeserializationWithBufferSizes/16KB-4 643.7µ 642.1µ ~ 0.400
_SubtreeDeserializationWithBufferSizes/32KB-4 671.9µ 629.4µ ~ 0.100
_SubtreeDeserializationWithBufferSizes/64KB-4 665.2µ 626.2µ ~ 0.100
_SubtreeDeserializationWithBufferSizes/128KB-4 666.9µ 626.1µ ~ 0.100
_SubtreeDeserializationWithBufferSizes/512KB-4 699.4µ 656.9µ ~ 0.200
_SubtreeDataDeserializationWithBufferSizes/16KB-4 35.74m 36.28m ~ 0.100
_SubtreeDataDeserializationWithBufferSizes/32KB-4 35.59m 35.51m ~ 0.700
_SubtreeDataDeserializationWithBufferSizes/64KB-4 36.05m 36.07m ~ 0.700
_SubtreeDataDeserializationWithBufferSizes/128KB-4 35.92m 36.19m ~ 1.000
_SubtreeDataDeserializationWithBufferSizes/512KB-4 35.37m 36.02m ~ 0.400
_PooledVsNonPooled/Pooled-4 746.5n 749.7n ~ 0.100
_PooledVsNonPooled/NonPooled-4 7.825µ 7.885µ ~ 0.700
_MemoryFootprint/Current_512KB_32concurrent-4 7.257µ 7.517µ ~ 0.100
_MemoryFootprint/Proposed_32KB_32concurrent-4 10.76µ 12.04µ ~ 0.100
_MemoryFootprint/Alternative_64KB_32concurrent-4 10.58µ 10.38µ ~ 0.100
_prepareTxsPerLevel-4 418.5m 418.0m ~ 1.000
_prepareTxsPerLevelOrdered-4 3.793m 4.080m ~ 0.400
_prepareTxsPerLevel_Comparison/Original-4 420.3m 424.5m ~ 0.100
_prepareTxsPerLevel_Comparison/Optimized-4 3.711m 3.756m ~ 1.000
SubtreeSizes/10k_tx_4_per_subtree-4 1.326m 1.257m ~ 0.400
SubtreeSizes/10k_tx_16_per_subtree-4 299.4µ 299.6µ ~ 1.000
SubtreeSizes/10k_tx_64_per_subtree-4 72.64µ 72.34µ ~ 0.700
SubtreeSizes/10k_tx_256_per_subtree-4 18.03µ 17.98µ ~ 0.400
SubtreeSizes/10k_tx_512_per_subtree-4 8.908µ 8.902µ ~ 0.700
SubtreeSizes/10k_tx_1024_per_subtree-4 4.403µ 4.402µ ~ 1.000
SubtreeSizes/10k_tx_2k_per_subtree-4 2.196µ 2.185µ ~ 0.700
BlockSizeScaling/10k_tx_64_per_subtree-4 70.11µ 69.76µ ~ 1.000
BlockSizeScaling/10k_tx_256_per_subtree-4 17.60µ 17.72µ ~ 0.400
BlockSizeScaling/10k_tx_1024_per_subtree-4 4.387µ 4.333µ ~ 0.200
BlockSizeScaling/50k_tx_64_per_subtree-4 363.7µ 370.2µ ~ 1.000
BlockSizeScaling/50k_tx_256_per_subtree-4 88.13µ 87.32µ ~ 0.100
BlockSizeScaling/50k_tx_1024_per_subtree-4 21.80µ 21.54µ ~ 0.700
SubtreeAllocations/small_subtrees_exists_check-4 150.6µ 151.1µ ~ 0.400
SubtreeAllocations/small_subtrees_data_fetch-4 160.9µ 157.6µ ~ 0.100
SubtreeAllocations/small_subtrees_full_validation-4 310.5µ 314.1µ ~ 0.400
SubtreeAllocations/medium_subtrees_exists_check-4 8.999µ 8.934µ ~ 0.200
SubtreeAllocations/medium_subtrees_data_fetch-4 9.353µ 9.446µ ~ 0.700
SubtreeAllocations/medium_subtrees_full_validation-4 17.56µ 17.77µ ~ 0.200
SubtreeAllocations/large_subtrees_exists_check-4 2.092µ 2.093µ ~ 1.000
SubtreeAllocations/large_subtrees_data_fetch-4 2.232µ 2.250µ ~ 0.600
SubtreeAllocations/large_subtrees_full_validation-4 4.321µ 4.376µ ~ 0.100
GetUtxoHashes-4 258.1n 264.4n ~ 0.200
GetUtxoHashes_ManyOutputs-4 44.43µ 44.21µ ~ 0.700
_NewMetaDataFromBytes-4 245.4n 244.3n ~ 0.700
_Bytes-4 635.1n 640.0n ~ 0.100
_MetaBytes-4 582.7n 580.9n ~ 0.700

Threshold: >10% with p < 0.05 | Generated: 2026-04-30 13:24 UTC

@sugh01 sugh01 requested a review from liam April 30, 2026 12:18
@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants