Skip to content

Refactor/consensus/download types#900

Merged
Mododo merged 2 commits intomasterfrom
refactor/consensus/download-types
Sep 17, 2025
Merged

Refactor/consensus/download types#900
Mododo merged 2 commits intomasterfrom
refactor/consensus/download-types

Conversation

@Mododo
Copy link
Copy Markdown
Member

@Mododo Mododo commented Sep 12, 2025

usage of updated consensus config broxus/tycho-types#55

Pull Request Checklist

NODE CONFIGURATION MODEL CHANGES

Yes

Consensus config param download_tasks: u16 moved to mempool node config param max_download_tasks: u16. New default value 250 replaces previous 260.

BLOCKCHAIN CONFIGURATION MODEL CHANGES

Consensus config (param 29) field download_tasks: u16 was replaced with min_sign_attempts: u8 and download_peer_queries: u8 . Compared to v0.2.12, config value stays of the same size, as broadcast_retry_attempts was removed from the end of the struct (was added in #867 with new tag which is also removed)


COMPATIBILITY

Affected features:

  • State. Blockchain Config
  • Mempool. Consensus Config

SPECIAL DEPLOYMENT ACTIONS

New genesis round and time must be applied to global config, because download_peer_queries affects overlay id, and new overlay id does not support history from the old genesis.

At least a couple of minutes before network upgrade, consensus config param download_tasks should be set to 778, so that it will be parsed as min_sign_attempts = 3 and download_peer_queries = 10 by new version. Outdated nodes should not experience high load before upgrade, so that amount of simultaneous download tasks stays low and does not hit 778.
Also config may be changed after network upgrade: until then, download_tasks = 260 will be parsed into min_sign_attempts = 1 and download_peer_queries = 4. It is a valid and operable config, but a rounds rate will be a bit higher than desirable, and high load should be avoided too before config change.

PERFORMANCE IMPACT

No impact expected


TESTS

Unit Tests

Covered by config serde in tycho-types

Network Tests

No special coverage

Manual Tests

transfers-30k
network upgrade

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 12, 2025

🧪 Network Tests

To run network tests for this PR, use:

gh workflow run network-tests.yml -f pr_number=900

Available test options:

  • Run all tests: gh workflow run network-tests.yml -f pr_number=900
  • Run specific test: gh workflow run network-tests.yml -f pr_number=900 -f test_selection=ping-pong

Test types: destroyable, ping-pong, one-to-many-internal-messages, fq-deploy, nft-index, persistent-sync

Results will be posted as workflow runs in the Actions tab.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 52.08333% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.61%. Comparing base (a5f6498) to head (7ef88a8).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
cli/src/cmd/tools/gen_zerostate.rs 0.00% 11 Missing ⚠️
consensus/src/intercom/dependency/downloader.rs 26.66% 11 Missing ⚠️
consensus/src/intercom/core/dispatcher.rs 0.00% 10 Missing ⚠️
consensus/src/intercom/dependency/limiter.rs 76.92% 4 Missing and 5 partials ⚠️
consensus/src/engine/impl_.rs 0.00% 8 Missing ⚠️
consensus/src/engine/input_buffer.rs 0.00% 5 Missing ⚠️
consensus/src/engine/consensus_config_ext.rs 57.14% 3 Missing ⚠️
collator/src/collator/do_collate/finalize.rs 0.00% 2 Missing ⚠️
collator/src/mempool/impls/single_node_impl.rs 0.00% 2 Missing ⚠️
consensus/src/engine/round_task.rs 0.00% 2 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #900      +/-   ##
==========================================
- Coverage   46.65%   46.61%   -0.04%     
==========================================
  Files         329      329              
  Lines       59168    59179      +11     
  Branches    59168    59179      +11     
==========================================
- Hits        27604    27586      -18     
- Misses      30133    30159      +26     
- Partials     1431     1434       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mododo Mododo self-assigned this Sep 15, 2025
@Mododo Mododo added this to the 020 Consensus milestone Sep 15, 2025
@Mododo Mododo force-pushed the refactor/consensus/download-types branch 2 times, most recently from ab13b84 to 7d6c346 Compare September 15, 2025 19:42
@Mododo Mododo marked this pull request as ready for review September 16, 2025 08:42
@Mododo Mododo force-pushed the refactor/consensus/download-types branch from 7d6c346 to 1a66899 Compare September 17, 2025 04:33
@SmaGMan
Copy link
Copy Markdown
Member

SmaGMan commented Sep 17, 2025

Was it tested in devnet: the config change after network upgrade? Looks like it should be the main upgrade scenario.

@Mododo
Copy link
Copy Markdown
Member Author

Mododo commented Sep 17, 2025

Yes, network upgrade and then config change was tested manually on devnet

@Mododo Mododo force-pushed the refactor/consensus/download-types branch from 1a66899 to 7ef88a8 Compare September 17, 2025 14:37
@Mododo Mododo added this pull request to the merge queue Sep 17, 2025
Merged via the queue into master with commit 309b288 Sep 17, 2025
19 of 20 checks passed
@Mododo Mododo deleted the refactor/consensus/download-types branch September 17, 2025 14:58
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