Skip to content

Basic Integration Testing RFC #1004

@teor2345

Description

@teor2345

We want to make sure that zebrad start works well after every merge to the main branch.

But at the moment, we aren't consistently testing zebrad's network behaviour.

We don't want to write a network integration test framework yet (#466), but some basic tests would be useful.

Describe the solution you'd like

I want to write up a small RFC that describes:

  • the scope of basic network integration tests
  • events that are worth testing
  • how we expect to test each in-scope event

For example, the following block sync, download and verify events are interesting:

Startup:

  • the first checkpoint (genesis, block 0)
  • the first 2000-block checkpoint (block 2000)
  • the second 2000-block checkpoint (block 4000)

Large Blocks:

  • the first checkpoint containing large blocks (106580 on mainnet, ? on testnet)
  • the second checkpoint containing large blocks (107063 on mainnet, ? on testnet)

End of Checkpoints:

  • the final default checkpoint, including Sapling activation (420347 on mainnet, 280000 on testnet)
  • the first full block verify (420348 on mainnet, 280001 on testnet)
  • the second full block verify (420349 on mainnet, 280002 on testnet)

End of Chain:

  • the first time Zebra downloads a side-chain
  • the first time a tip extension gets a short response, near the end of the chain
  • the first time obtain tips is run after reaching the end of the chain
  • the first time extend tips is run after reaching the end of the chain
  • the first time we have to wait for a block to be mined

Restart with Existing State:

  • during checkpoint verification
  • after checkpoint verification
  • near the current tip

Checkpoint Sync Mode:

  • up to sapling only (default, checkpoint_sync = false)
  • use as many checkpoints as possible (faster sync, checkpoint_sync = true)

Describe alternatives you've considered

We could do nothing, but that risks regressions.

We could create a full network integration test framework (#466), but that could take a lot of work.

Additional context

RFC Pull Request: #1007

These tests could catch sync bugs like #1003.
We want to write a full network integration test framework in #466.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: DocumentationC-designCategory: Software design workS-needs-designStatus: Needs a design decision

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions