-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat(CLI): add --wasm
args to bump/restore
#775
Conversation
@paulbellamy Currently when trying using restore on the wasm with installed contracts that have expired (hello world contract in soroban examples) and bump on a recently installed contract, both result in the error:
|
Hey Willem, Do you have the tx meta handy for this error? We can get more insight on where the error is coming from. |
Rerunning with the
I still get the entry not present, but there is a comment about how the transactionResult will always succeed, so the entry must be checked. |
This is the decoded OperationMeta you posted. It looks like the expiration ledger (65500) is larger than the current ledger (61404). Maybe one of the CLI validation checks is incorrect?
|
Ah it might be this - https://github.com/stellar/soroban-tools/blob/4ebeeea9541031f9585cbfb8bf73ec5533cb3a7d/cmd/soroban-cli/src/commands/contract/restore.rs#L189C9-L189C9. It's expecting ContractData but we can also restore ContractCode @tsachiherman. |
Currently installed contract code can expire and we need a way to bump and restore them.
a628888
to
a99a627
Compare
@sisuresh Thanks! I updated to check for the correct ledger entry and it seems to be working. For a bump that is. However, since there is a minimum time of 6 hours expiration, I will need to wait to test restore. Unless there is a negative bump, but it seems unsigned ints are used (rightfully so) in the transaction. |
@sreuland could you take a look on this PR, as we might need to make changes to the |
Luckily the increment contract was expired so I was able to try restore and it worked! However, the return value was not what a ledger update but rather a creation. Just updated the code and will try again once another contract binary expires |
issue : #782 |
if this changeset were to make contract install idempotent, then I would say system-test does not need to change immediately as there would be no net breaking change in UX. is that possible? if not good approach, then yes, need to change system test to be more defensive and run also, in general, we should add new coverage for |
Currently installed contract code can expire and we need a way to bump and restore them.