-
Notifications
You must be signed in to change notification settings - Fork 58
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
fix(svm): H-01 optimize claiming relayer refunds #847
fix(svm): H-01 optimize claiming relayer refunds #847
Conversation
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
test/svm/SvmSpoke.Bundle.ts
Outdated
tokenProgram: TOKEN_PROGRAM_ID, | ||
program: program.programId, | ||
}; | ||
// Will not claim for the first relayer as if its token account was blacklisted. |
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.
Out of curiosity, why do we simulate the first relayer being blacklisted?
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.
agree, this was rather arbitrary. now simplified the tests by claiming to all accounts
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.
Looks good!
Signed-off-by: Reinis Martinsons <[email protected]>
…ccounts-for-all-relayers-in
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
|
||
it("Execute Max multiple refunds with claims in separate phase versioned transactions", async () => { | ||
// Larger amount would hit maximum instruction trace length limit. | ||
const solanaDistributions = 21; |
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.
Nice improvement!
…ccounts-for-all-relayers-in Signed-off-by: Reinis Martinsons <[email protected]>
test/svm/SvmSpoke.Bundle.ts
Outdated
program: program.programId, | ||
}; | ||
claimInstructions.push( | ||
await program.methods.claimRelayerRefundFor().accounts(claimRelayerRefundAccounts).instruction() |
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.
ThisclaimRelayerRefundFor
is remaining
Signed-off-by: Reinis Martinsons <[email protected]>
OZ identified following issue:
We have opted to apply only a limited fix by optimizing the way how relayer refund claim instructions are composed by moving its parameters to account data.