-
Notifications
You must be signed in to change notification settings - Fork 15
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
test: bouncer script to init swaps and send sol #5579
base: release/1.7
Are you sure you want to change the base?
Conversation
36496a2
to
e613dd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we should probably make this a PR to main now instead of 1.7.
const depositAddresses = await requestBatchOfSwaps(batchSize); | ||
console.log(`Sent funds to ${depositAddresses.length} deposit channels`); | ||
for (const depositAddress of depositAddresses) { | ||
await sendSol(depositAddress, solAmount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned IRL, we should add a small amount of SOL as we go so each amount is different, otherwise the RPC will dedupe them.
You can just copy what's in spam_sol.ts
:
solAmount = solAmount.plus(new BigNumber(1).div(10 ** decimals));
// Opens 1000 deposit channels | ||
// Execute: ./commands/run_test.ts spam_solana_deposit_channels.ts | ||
async function main() { | ||
const batches = 200; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too many batches for a bouncer run, will take a long time to complete. We can drop this to around 10 and get most of the benefit, in particular because it'll be running alongside all the other tests.
For manual testing, we can always increase this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely. I think it doesn't really make senses to run this automatic at all in my opinion, since it is pretty hard to verify the expected result. The idea was to have this more as a tool to debug a network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we even want to have this permanently in our code base though :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can probably just leave it as a manual script, or delete it, I don't mind either way. Deleting is probably better for maintainability
Pull Request
Closes: PRO-xxx
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Please include a succinct description of the purpose and content of the PR. What problem does it solve, and how? Link issues, discussions, other PRs, and anything else that will help the reviewer.