Skip to content

Improvements to connect to mainnet/devnet tests #18464

@cjjdespres

Description

@cjjdespres

This is more of a general test improvement thing, not necessary for mesa. Also we could consider writing different tests to cover the things I'm talking about, but the existing ones could be modified instead. These tests are implemented in connect-to-network.sh, for context. All this test does is start up a daemon, checks that it's connected to enough peers and still alive after a few minutes, then exits with success.

The test actually kept succeeding on develop even after a bunch of the libp2p RPC versions were bumped, because none of the chain_id inputs had been updated. Thus we got a bunch of libp2p peer connections, but the daemon was unable to communicate with any of them - the test logs clearly showed that all the best tip queries were failing, and (if I remember correctly) I manually tested a develop daemon and saw that its RPC queries never succeeded.

The fact that this test kept succeeding sort of implies that it's not catching things in current compatible. I believe the only effective test we have that a daemon can actually sync to devnet or mainnet, for instance, is the rosetta connectivity tests. So, maybe a few suggestions:

  1. Consider renaming these tests to "Libp2p connect to mainnet/devnet" or something, if they're not going to be changed.
  2. Maybe change this test or add a new test that involves just the daemon syncing to mainnet/devnet, independent of the rosetta test. Could also use this to test some other mina subcommands/daemon behaviours, that might only manifest when the daemon is synced to a network. (E.g., regression test so the peer node status command can be fixed and not broken again, or a regression test for the frontier visualization. Though, this kind of thing might want to go in the test executive).

The fact that we're testing daemon sync in the rosetta tests is probably good enough for now, though, so this issue could just be resolved by documenting exactly what this test guarantees when it succeeds, and maybe changing the name too.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions