Skip to content

Support persistent split with s3 provider - #1122

Open
SmaGMan wants to merge 2 commits into
masterfrom
feature/s3-split-persistent
Open

Support persistent split with s3 provider#1122
SmaGMan wants to merge 2 commits into
masterfrom
feature/s3-split-persistent

Conversation

@SmaGMan

@SmaGMan SmaGMan commented Aug 12, 2026

Copy link
Copy Markdown
Member

Pull Request Checklist

NODE CONFIGURATION MODEL CHANGES

[None]

BLOCKCHAIN CONFIGURATION MODEL CHANGES

[None]


COMPATIBILITY

Fully compatible

  • Existing single-file persistent states in s3 remain discoverable and downloadable.
  • Without activated persistent_state_split_depth the uploader will store a single-file state without metadata.
  • Metadata is parsed through the versioned PersistentStateMeta schema and validated before it is used.
  • Missing or zero-sized declared S3 objects make the state unavailable.
  • Invalid metadata returns an error and never falls back to legacy discovery.

SPECIAL DEPLOYMENT ACTIONS

[Required]

Deploy the updated Tycho nodes before deploying the updated uploader. This ensures that every S3 persistent-state reader can process the metadata and declared state files published by the uploader.

On the testnet:

  • update validator nodes, indexers, other validators and set up .core_storage.persistent_state_split_depth = 3
  • update uploader and set up .core_storage.persistent_state_split_depth = 3
  • wait until persistent state is produced and check that it was uploaded to the bucket
  • re-sync some testnet node from the s3

PERFORMANCE IMPACT

[No impact expected]


TESTS

Unit Tests

[Covered by:]

  • persistent_state_meta_bytes_roundtrip
  • persistent_state_discovery_handles_legacy_and_split_bundles
  • persistent_state_manifest_rejects_incomplete_and_invalid_bundles
  • persistent_state_download_selects_main_or_declared_part
  • s3_rpc_provider_advertises_split_info_and_reads_declared_part
  • s3_starter_client_returns_split_found_state_and_downloads_main_and_part
  • split_persistent_shard_state_import_from_dump

Network Tests

[No coverage]

Manual Tests

Manual tests used:

  • activate hack to generate persistent every key block
  • run local network with 3 nodes with .blockchain_rpc_service.serve_persistent_states = false and .core_storage.persistent_state_split_depth = 2
  • set up and run uploader in the same network but not in consensus with .core_storage.persistent_state_split_depth = 2
  • run transfers test to deploy accounts and make some load, then stop the test
  • make bc config change to force the key block
  • check the persistent state saved on the validation nodes and on the uploader
  • use mc to check that persistent state bundle was successfully uploaded to s3
  • stop uploader
  • setup and run additional consumer node with s3 feature activated and targeting the same zerostate
  • it should not found persistent state on the neighbours, switch to the secondary s3 provider, find, download and apply splitted persistent state

Base automatically changed from feature/poisoned-raw-import-marker to master August 19, 2026 13:46
@SmaGMan
SmaGMan force-pushed the feature/s3-split-persistent branch from 6ef715d to 78984d4 Compare August 20, 2026 09:18
@github-actions

Copy link
Copy Markdown

🧪 Network Tests

To run network tests for this PR, use:

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

Available test options:

  • Run all tests: gh workflow run network-tests.yml -f pr_number=1122
  • Run specific test: gh workflow run network-tests.yml -f pr_number=1122 -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

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.66667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.45%. Comparing base (eb56303) to head (090edba).

Files with missing lines Patch % Lines
core/src/block_strider/starter/cold_boot.rs 0.00% 6 Missing ⚠️
...src/storage/persistent_state/shard_state/writer.rs 87.50% 0 Missing and 3 partials ⚠️
core/src/storage/persistent_state/tests.rs 93.33% 0 Missing and 1 partial ⚠️
util/src/serde_helpers.rs 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1122      +/-   ##
==========================================
+ Coverage   60.43%   60.45%   +0.02%     
==========================================
  Files         487      487              
  Lines       85229    85271      +42     
  Branches    85229    85271      +42     
==========================================
+ Hits        51504    51547      +43     
+ Misses      31202    31201       -1     
  Partials     2523     2523              

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SmaGMan
SmaGMan force-pushed the feature/s3-split-persistent branch from 78984d4 to 090edba Compare August 20, 2026 09:52
@SmaGMan
SmaGMan marked this pull request as ready for review August 20, 2026 09:59
@SmaGMan
SmaGMan requested review from 0xdeafbeef and Rexagon August 20, 2026 09:59
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.

1 participant