8000 Create network test for persistent state · Issue #688 · broxus/tycho · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Create network test for persistent state #688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SmaGMan opened this issue Apr 18, 2025 · 0 comments
Open

Create network test for persistent state #688

SmaGMan opened this issue Apr 18, 2025 · 0 comments
Labels
C-collator Collator module C-core Core module C-internal-queue Internal queue submodule in Collator P-high High priority S-feature Severity: feature. This is adding a new feature.
92D8

Comments

@SmaGMan
Copy link
Contributor
SmaGMan commented Apr 18, 2025

We need to test that persistent state created correctly and then can be used for sync.

Scenario:

  1. Set up a network with 4 nodes.
  2. Start 3 of the nodes.
  3. Apply enough load to create an internal queue in two partitions (1-255 + swaps, transfers).
  4. Wait until a persistent is created.
  5. Start the 4th node.
  6. Verify that it syncs from the persistent and successfully produces a correct block.

A new configuration parameter or environment variable is needed to adjust the interval of persistent block creation for testing purposes here

To trigger persistent creation, it’s necessary to produce key blocks. This can be done by making a minor, non-impactful change to the blockchain config via the control server.

We want to test the following scenario:

  • The node loads from a persistent, then continues syncing via fresh archives, and finally switches to syncing by actual blocks.
  • At that moment, the tail of the internal queue should be older than the block at which the persistent was created.
  • The node collates a block, and it must match the one collated by other nodes.

To ensure this, the internal queue must be large enough so that, when the node attempts to collate, the queue tail is still below the persistent point.
If the node continues syncing before starting to collate, processed_to might surpass the persistent block, making the test irrelevant.

A mismatch in the produced block can be detected via the metric tycho_collator_block_mismatch_count

curl bla/metrics | grep ..
@SmaGMan SmaGMan added C-collator Collator module C-core Core module C-internal-queue Internal queue submodule in Collator P-high High priority S-feature Severity: feature. This is adding a new feature. labels Apr 18, 2025
@SmaGMan SmaGMan added this to the Stable Master - April 2025 milestone Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-collator Collator module C-core Core module C-internal-queue Internal queue submodule in Collator P-high High priority S-feature Severity: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant
0