Request 1M compute units in transfer remote (#2771)
### Description Because incremental merkle tree insertion complexity can change depending on what the index in the merkle tree is, we ran into a situation where the 200k default compute limit wasn't enough when trying to perform a transfer remote on sealevel. Normal cost for index 257, about 158k units: https://explorer.solana.com/tx/4oB9b6PaaKvGMhrQS7XGmi7zBpX3GUW99sbVrSjFwm5AVT96emKF4NH6gn2y9cLMLep8wQJ9LqwJifG5QMpr4BAs Index 255, about 245k units!: https://explorer.solana.com/tx/3v6SbrT58smwnLdnrEFaMXowaEDmo6EpPmKFTUMe9aESo5FTExmJdr2uMH5QJW9hnZTqrB1mfFZe4Vmu75CCAyPs The fix is to simply request more units. Solana tx fees don't actually charge you more if you use more units. Txs have a global cap of 1.4M units -- I'm just requesting 1M here as a balance between having lots of units & not bricking ourselves if the max compute unit amount ever decreases ### Drive-by changes n/a ### Related issues n/a ### Backward compatibility Yes ### Testing I tested a version of this in the UI - I went to the commit where we published 1.5.1, and then published a 1.5.1-beta2 version with this change and moved the UI over to it. Opening this now so we can get this in main and move the UI over to a less sketchy versionpull/2782/head
parent
a82a8148cb
commit
1b98c13095
Loading…
Reference in new issue