starknet.js icon indicating copy to clipboard operation
starknet.js copied to clipboard

Lets use 2 different (funded) wallets for our tests

Open janek26 opened this issue 2 years ago • 3 comments

Currently the test run for for the sequencer provider and for the rpc provider share the same wallet and keypair for testing provided by TEST_ACCOUNT_ADDRESS= and TEST_ACCOUNT_PRIVATE_KEY=.

I propose to add a 2nd funded wallet (we need some more funds for the existing wallet too, as it's almost empty)

we could rename the secrets into something like:

TEST_ACCOUNT_ADDRESS_1=***
TEST_ACCOUNT_PRIVATE_KEY_1=***
TEST_ACCOUNT_ADDRESS_2=***
TEST_ACCOUNT_PRIVATE_KEY_2=***

and map it inside the workflow file to the job

This would enable us to run release pipelines in parallel and would speed up the pipeline 3 times

janek26 avatar Aug 03 '22 13:08 janek26

We can't run them in parallel in the same wallet because it would cause a nonce issue right?

Would it be wise to name the wallets more explicitly? like

TEST_ACCOUNT_ADDRESS_RPC

& 

TEST_ACCOUNT_ADDRESS_SEQUENCER

0xs34n avatar Aug 03 '22 13:08 0xs34n

Right, currently we limit the matrix to run maximum 1 job in parallel because otherwise we would get nonce issues See https://github.com/0xs34n/starknet.js/blob/develop/.github/workflows/release.yml#L29

I opted for more general names to avoid having explicit mapping to sequencer/rpc in the secret name This mapping would be done in the workflow file

By keeping it this way we can add more/less accounts and just do the mapping in the workflow file, in example if we decide to have multiple test accounts for one kind of provider to parallelise tests further ie we could decide to add a separate wallet for each for main and develop to make both branches able to run tests at the same time

janek26 avatar Aug 03 '22 13:08 janek26

funded 0.25 eth in testnet

0xs34n avatar Aug 03 '22 14:08 0xs34n

Closing this issue as the Sequencer provider is going to be deprecated, untill than we are going to run on 1 test acc.

tabaktoni avatar Jun 14 '23 07:06 tabaktoni