Skip to content
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

soroban-cli bump outputs an error while successful #969

Closed
vinamogit opened this issue Sep 18, 2023 · 6 comments · Fixed by #981
Closed

soroban-cli bump outputs an error while successful #969

vinamogit opened this issue Sep 18, 2023 · 6 comments · Fixed by #981
Labels
bug Something isn't working

Comments

@vinamogit
Copy link
Contributor

What version are you using?

soroban --version
soroban 20.0.0-rc1 (7d3b4175b1970f76455b4789797c2edc5f79e432)
soroban-env 20.0.0-rc1 (f19ef13363a1e0cbff7b100c0599a1d63dea88a6)
soroban-env interface version 85899345977
stellar-xdr 20.0.0-rc1 (d5ce0c9e7aa83461773a6e81662067f35d39e4c1)
xdr curr (9ac02641139e6717924fdad716f6e958d0168491)

What did you do?

soroban --very-verbose contract bump  --id CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT \
  --source admin --network futurenet --durability persistent --ledgers-to-expire 60000

What did you expect to see?

A successful message

What did you see instead?

error: Ledger entry not found

If you run the same command with --very-verbose yout get

2023-09-18T05:59:51.771436Z TRACE soroban_cli::commands::contract::bump: network=Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022" }
2023-09-18T05:59:51.798509Z TRACE soroban_cli::rpc: uri=https://rpc-futurenet.stellar.org:443/
2023-09-18T05:59:51.827419Z TRACE soroban_cli::rpc: Getting address GDGE7LBXW6YRTBVM7FWT4ZV5GBUQFY3D7BPIAF2F7V4MMHD4EK4645KM
2023-09-18T05:59:52.841814Z TRACE soroban_cli::rpc: account=AccountEntry { account_id: AccountId(PublicKeyTypeEd25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee))), balance: 99999968598, seq_num: SequenceNumber(148829206740998), num_sub_entries: 0, inflation_dest: None, flags: 0, home_domain: String32(StringM()), thresholds: Thresholds(01000000), signers: VecM([]), ext: V1(AccountEntryExtensionV1 { liabilities: Liabilities { buying: 0, selling: 0 }, ext: V2(AccountEntryExtensionV2 { num_sponsored: 0, num_sponsoring: 0, signer_sponsoring_i_ds: VecM([]), ext: V3(AccountEntryExtensionV3 { ext: V0, seq_ledger: 40590, seq_time: TimePoint(1695015865) }) }) }) }
2023-09-18T05:59:52.842677Z TRACE soroban_cli::rpc: Getting latest ledger
2023-09-18T05:59:53.746238Z TRACE soroban_cli::rpc: tx=Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 100, seq_num: SequenceNumber(148829206740999), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 60000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 0, write_bytes: 0 }, refundable_fee: 0 }) }
2023-09-18T05:59:53.746295Z TRACE soroban_cli::rpc: tx=Tx(TransactionV1Envelope { tx: Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 100, seq_num: SequenceNumber(148829206740999), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 60000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 0, write_bytes: 0 }, refundable_fee: 0 }) }, signatures: VecM([]) })
2023-09-18T05:59:54.462942Z TRACE soroban_cli::rpc: response=SimulateTransactionResponse { min_resource_fee: 5275, cost: Cost { cpu_insns: 0, mem_bytes: 0 }, results: [], transaction_data: "AAAAAAAAAAEAAAAGAAAAAX3B7N+TNRmfyZGNvgxzLOHRFGqo8pzJw2CvxqdHrpTfAAAAFAAAAAEAAAAAAAAAAAAAASgAAAAAAAAAAAAAAAA=", events: [], restore_preamble: None, latest_ledger: 40766, error: None }
2023-09-18T05:59:54.471566Z TRACE soroban_cli::rpc: tx=Tx(TransactionV1Envelope { tx: Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 6181, seq_num: SequenceNumber(148829206740999), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 60000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 296, write_bytes: 0 }, refundable_fee: 0 }) }, signatures: VecM([DecoratedSignature { hint: SignatureHint(7c22b9ee), signature: Signature(BytesM(556d1bb80245239718efbba2fbe506c56768c73e078349aa8166883392dfe29d112bcbf5c9e96f374ec42d2546e0ef9f008751559ceed7282ccb897665916c0b)) }]) })
2023-09-18T06:00:00.709764Z TRACE soroban_cli::rpc: response=GetTransactionResponse { status: "SUCCESS", envelope_xdr: Some("AAAAAgAAAADMT6w3t7EZhqz5bT5mvTBpAuNj+F6AF0X9eMYcfCK57gAAGCUAAIdcAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAZAAAAAAAA6mAAAAABAAAAAAAAAAEAAAAGAAAAAX3B7N+TNRmfyZGNvgxzLOHRFGqo8pzJw2CvxqdHrpTfAAAAFAAAAAEAAAAAAAAAAAAAASgAAAAAAAAAAAAAAAAAAAABfCK57gAAAEBVbRu4AkUjlxjvu6L75QbFZ2jHPgeDSaqBZogzkt/inREry/XJ6W83TsQtJUbg758Ah1FVnO7XKCzLiXZlkWwL"), result_xdr: Some("AAAAAAAAEDEAAAAAAAAAAQAAAAAAAAAZAAAAAAAAAAA="), result_meta_xdr: Some("AAAAAwAAAAAAAAACAAAAAwAAnz8AAAAAAAAAAMxPrDe3sRmGrPltPma9MGkC42P4XoAXRf14xhx8IrnuAAAAF0h2XSUAAIdcAAAABgAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAACejgAAAABlB+O5AAAAAAAAAAEAAJ8/AAAAAAAAAADMT6w3t7EZhqz5bT5mvTBpAuNj+F6AF0X9eMYcfCK57gAAABdIdl0lAACHXAAAAAcAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAnz8AAAAAZQfnXwAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAA=") }
2023-09-18T06:00:00.716512Z TRACE soroban_cli::commands::contract::bump: result=TransactionResult { fee_charged: 4145, result: TxSuccess(VecM([OpInner(BumpFootprintExpiration(Success))])), ext: V0 }
2023-09-18T06:00:00.716554Z TRACE soroban_cli::commands::contract::bump: meta=V3(TransactionMetaV3 { ext: V0, tx_changes_before: LedgerEntryChanges(VecM([State(LedgerEntry { last_modified_ledger_seq: 40767, data: Account(AccountEntry { account_id: AccountId(PublicKeyTypeEd25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee))), balance: 99999964453, seq_num: SequenceNumber(148829206740998), num_sub_entries: 0, inflation_dest: None, flags: 0, home_domain: String32(StringM()), thresholds: Thresholds(01000000), signers: VecM([]), ext: V1(AccountEntryExtensionV1 { liabilities: Liabilities { buying: 0, selling: 0 }, ext: V2(AccountEntryExtensionV2 { num_sponsored: 0, num_sponsoring: 0, signer_sponsoring_i_ds: VecM([]), ext: V3(AccountEntryExtensionV3 { ext: V0, seq_ledger: 40590, seq_time: TimePoint(1695015865) }) }) }) }), ext: V0 }), Updated(LedgerEntry { last_modified_ledger_seq: 40767, data: Account(AccountEntry { account_id: AccountId(PublicKeyTypeEd25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee))), balance: 99999964453, seq_num: SequenceNumber(148829206740999), num_sub_entries: 0, inflation_dest: None, flags: 0, home_domain: String32(StringM()), thresholds: Thresholds(01000000), signers: VecM([]), ext: V1(AccountEntryExtensionV1 { liabilities: Liabilities { buying: 0, selling: 0 }, ext: V2(AccountEntryExtensionV2 { num_sponsored: 0, num_sponsoring: 0, signer_sponsoring_i_ds: VecM([]), ext: V3(AccountEntryExtensionV3 { ext: V0, seq_ledger: 40767, seq_time: TimePoint(1695016799) }) }) }) }), ext: V0 })])), operations: VecM([OperationMeta { changes: LedgerEntryChanges(VecM([])) }]), tx_changes_after: LedgerEntryChanges(VecM([])), soroban_meta: Some(SorobanTransactionMeta { ext: V0, events: VecM([]), return_value: Bool(false), diagnostic_events: VecM([]) }) })
@vinamogit vinamogit added the bug Something isn't working label Sep 18, 2023
@vinamogit vinamogit changed the title soroban-cli bump result with an error while successful soroban-cli bump results with an error while successful Sep 18, 2023
@vinamogit vinamogit changed the title soroban-cli bump results with an error while successful soroban-cli bump outputs an error while successful Sep 18, 2023
@willemneal
Copy link
Member

The issue is here

operations: VecM([OperationMeta { changes: LedgerEntryChanges(VecM([])) }]),

The transaction is successful but the updated expiration is missing.

@2opremio
Copy link
Contributor

I suspect that the bump operation is a noop but that the CLI expects a change in the transaction metadata.

@vinamogit apart from confirming that the expiration changed, did you also confirm that the expiration of the entry changed? Do you also have the transaction's hash hanging around?

@willemneal
Copy link
Member

Can confirm that this is an issue where the provided expiration bump is less than the current expiration, resulting in the no-op. So CLI just needs to query for the expiration in this case and provide the user with the current one.

@willemneal
Copy link
Member

@vinamogit Can you try with a higher bump?

@vinamogit
Copy link
Contributor Author

Not sure what to put as upper limit.
Tried 100000 but get a malformed error

soroban --very-verbose contract bump  --id CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT --source admin --network futurenet --durability persistent --ledgers-to-expire 1000000
2023-09-18T19:28:51.169336Z TRACE soroban_cli::commands::contract::bump: network=Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022" }
2023-09-18T19:28:51.169424Z TRACE soroban_cli::rpc: uri=https://rpc-futurenet.stellar.org:443/
2023-09-18T19:28:51.172305Z TRACE soroban_cli::rpc: Getting address GDGE7LBXW6YRTBVM7FWT4ZV5GBUQFY3D7BPIAF2F7V4MMHD4EK4645KM
2023-09-18T19:28:51.860667Z TRACE soroban_cli::rpc: account=AccountEntry { account_id: AccountId(PublicKeyTypeEd25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee))), balance: 99999957042, seq_num: SequenceNumber(148829206741000), num_sub_entries: 0, inflation_dest: None, flags: 0, home_domain: String32(StringM()), thresholds: Thresholds(01000000), signers: VecM([]), ext: V1(AccountEntryExtensionV1 { liabilities: Liabilities { buying: 0, selling: 0 }, ext: V2(AccountEntryExtensionV2 { num_sponsored: 0, num_sponsoring: 0, signer_sponsoring_i_ds: VecM([]), ext: V3(AccountEntryExtensionV3 { ext: V0, seq_ledger: 41130, seq_time: TimePoint(1695018710) }) }) }) }
2023-09-18T19:28:51.860954Z TRACE soroban_cli::rpc: Getting latest ledger
2023-09-18T19:28:52.218544Z TRACE soroban_cli::rpc: tx=Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 100, seq_num: SequenceNumber(148829206741001), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 1000000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 0, write_bytes: 0 }, refundable_fee: 0 }) }
2023-09-18T19:28:52.218685Z TRACE soroban_cli::rpc: tx=Tx(TransactionV1Envelope { tx: Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 100, seq_num: SequenceNumber(148829206741001), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 1000000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 0, write_bytes: 0 }, refundable_fee: 0 }) }, signatures: VecM([]) })
2023-09-18T19:28:52.780496Z TRACE soroban_cli::rpc: response=SimulateTransactionResponse { min_resource_fee: 8896, cost: Cost { cpu_insns: 0, mem_bytes: 0 }, results: [], transaction_data: "AAAAAAAAAAEAAAAGAAAAAX3B7N+TNRmfyZGNvgxzLOHRFGqo8pzJw2CvxqdHrpTfAAAAFAAAAAEAAAAAAAAAAAAAASgAAAAAAAAAAAAADiU=", events: [], restore_preamble: None, latest_ledger: 50001, error: None }
2023-09-18T19:28:52.781761Z TRACE soroban_cli::rpc: tx=Tx(TransactionV1Envelope { tx: Transaction { source_account: Ed25519(Uint256(cc4fac37b7b11986acf96d3e66bd306902e363f85e801745fd78c61c7c22b9ee)), fee: 10345, seq_num: SequenceNumber(148829206741001), cond: None, memo: None, operations: VecM([Operation { source_account: None, body: BumpFootprintExpiration(BumpFootprintExpirationOp { ext: V0, ledgers_to_expire: 1000000 }) }]), ext: V1(SorobanTransactionData { ext: V0, resources: SorobanResources { footprint: LedgerFootprint { read_only: VecM([ContractData(LedgerKeyContractData { contract: Contract(Hash(7dc1ecdf9335199fc9918dbe0c732ce1d1146aa8f29cc9c360afc6a747ae94df)), key: LedgerKeyContractInstance, durability: Persistent })]), read_write: VecM([]) }, instructions: 0, read_bytes: 296, write_bytes: 0 }, refundable_fee: 3621 }) }, signatures: VecM([DecoratedSignature { hint: SignatureHint(7c22b9ee), signature: Signature(BytesM(48b26a6ea1b275b9fe8b2a15930bf32fc2895e7fac20a0f22a74cd6ea23ae667edc3aa8e8dfeda2415d0641fa3ecefbcac8b0b5251a07fe2033722e118b02805)) }]) })
2023-09-18T19:28:53.497541Z ERROR soroban_cli::rpc: error=Ok(TxFailed(VecM([OpInner(BumpFootprintExpiration(Malformed))])))
error: transaction submission failed: TxFailed(
    VecM(
        [
            OpInner(
                BumpFootprintExpiration(
                    Malformed,
                ),
            ),
        ],
    ),
)

This contract is the native SAC by the way.

@willemneal
Copy link
Member

@vinamogit this worked for me

soroban --very-verbose contract bump  --id CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT \
  --source admin --network futurenet --durability persistent --ledgers-to-expire 200000

New expiration ledger: 253204

Very strange indeed. Tomorrow I'll have a fix that at least tell you what the current expiration is if you are under it.

deep-ink-ventures added a commit to deep-ink-ventures/elio-dao-protocol that referenced this issue Sep 20, 2023
deep-ink-ventures added a commit to deep-ink-ventures/elio-dao-protocol that referenced this issue Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@willemneal @2opremio @vinamogit and others