Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Create a browser node test that syncs with a local development node #6467

Description

@expenses

At the moment, the browser node is a pain to maintain, and breaks frequently (#6457 etc). As we can't test the browser node fully without syncing with another node, and as syncing with flaming fir or another permanent testnet is unreliable, we need a test that tries to sync the browser node with a temporary dev node that's spun up in CI.

Here is a rough idea of how it would work:

  1. A --dev node is started up with --listen-addr /ip4/0.0.0.0/tcp/30334/ws.
  2. The dev node's peer id is fetched.
  3. A headless browser test is started, with the peer id as an argument.
  4. We test to see if the test syncs a few blocks within a certain time frame (i.e. 1 minute).

Here is a branch that I've started writing this on: https://github.com/paritytech/substrate/tree/ashley-browser-sync-test (based on #6457).

Unfortunately, when I run a node with cargo run -- --dev --validator --listen-addr /ip4/0.0.0.0/tcp/30333 --listen-addr /ip4/0.0.0.0/tcp/30334/ws, the browser node keeps connecting and disconnecting: https://gist.github.com/expenses/212d7c4d9e82c893ace412c99f4764f4, so we need to sort that out first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I5-testsTests need fixing, improving or augmenting.U2-some_time_soonIssue is worth doing soon.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions