Skip to content
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

Try to use a throwaway key in long faucet chain test #2723

Open
jvff opened this issue Oct 27, 2024 · 1 comment · May be fixed by #2725
Open

Try to use a throwaway key in long faucet chain test #2723

jvff opened this issue Oct 27, 2024 · 1 comment · May be fixed by #2725
Labels
Milestone

Comments

@jvff
Copy link
Contributor

jvff commented Oct 27, 2024

Motivation

The long faucet chain test opens many chains, and removes them from the wallet before starting the faucet. This step could be simplified by opening the chains with throwaway keys.

However, when attempting to do so, the test reported lots of error messages:

Failed to query validator about missing blocks [...] error=The received chain info response is invalid

And then the test eventually failed right after starting the faucet with the error:

Error: Failed to obtain the genesis configuration from the faucet

Proposal

Investigate why these errors are happening, and attempt to fix them.

@afck
Copy link
Contributor

afck commented Oct 27, 2024

It looks like this only fails with sufficiently long chains. On main, with this change, the test passes for me with 300 iterations but I get lots of os error 16 with 1000 iterations.

-        let (_, new_chain_id) = faucet_client
-            .open_chain(faucet_chain, None, Amount::ONE)
+        faucet_client
+            .open_chain(faucet_chain, Some(PublicKey::test_key(1)), Amount::ONE)
             .await?;
-        faucet_client.forget_chain(new_chain_id).await?;

I think the problem may be that in linera/main.rs, when handling OpenChain, we always add the new chain to the wallet. There, too, we should probably only do that if we have the secret key.

Adding forget_chain back does indeed solve it for me, despite the test_key(1). So the problem seems to be that the faucet fails to start up if it has 1000 chains in its wallet.

@afck afck linked a pull request Oct 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants