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

Remove all state from default stateConfig.json #2783

Open
nedsalk opened this issue Jul 18, 2024 · 4 comments
Open

Remove all state from default stateConfig.json #2783

nedsalk opened this issue Jul 18, 2024 · 4 comments
Assignees
Labels
chore Issue is a chore

Comments

@nedsalk
Copy link
Contributor

nedsalk commented Jul 18, 2024

The stateConfig.json file currently is populated mainly because of the old testing approach so that we could use multiple wallets in parallel and avoid the "trying to spend already spent UTXO" issue. Once #2698 is finished, all the coins and messages can be removed because we have full control of the initial state of the chain via the launchTestNode interface. This will still break some tests, like this one, which were relying on that state.

It's important to note that the fuels.config.ts's privateKey property is also set to match one of the owners in the current stateConfig.json and it'll break once the initial state is removed. This stateConfig.json population logic should then be moved into the fuels cli so that we don't have a breaking change here. The utility launchNode gives users the ability to define their own stateConfig.json, so that can be utilized.

@nedsalk nedsalk added blocked chore Issue is a chore labels Jul 18, 2024
@nedsalk nedsalk added this to the 0.x post-launch milestone Jul 18, 2024
@arboleya arboleya removed this from the 0.x post-launch milestone Jul 19, 2024
@petertonysmith94
Copy link
Contributor

@nedsalk do you think this could be related to the following discussion - points 3 & 5?

@arboleya arboleya added the p2 label Jul 19, 2024
@arboleya
Copy link
Member

Blocked by:

@petertonysmith94
Copy link
Contributor

This might break the templates, which uses the faucet referenced by the private key 0x01.

@nedsalk
Copy link
Contributor Author

nedsalk commented Aug 16, 2024

@petertonysmith94 The templates use autoStartFuelCore under the hood, and there we can pass a custom stateConfig into launchNode and give coins to private key 0x01 so that no breaking happens.

@arboleya arboleya added temp-p2 and removed temp-p2 labels Sep 7, 2024
@arboleya arboleya added the temp:notion label Sep 8, 2024 — with Linear
@arboleya arboleya added the temp-linear label Sep 8, 2024 — with Linear
@Dhaiwat10 Dhaiwat10 self-assigned this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

No branches or pull requests

4 participants