From fadda47615d29feefba82ed43e20b71cc9419211 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Thu, 3 Oct 2024 09:29:54 -0700 Subject: [PATCH 1/2] Update v22 cost types for rolling back wasmi change --- src/ledger/NetworkConfig.cpp | 114 ----------------------------------- 1 file changed, 114 deletions(-) diff --git a/src/ledger/NetworkConfig.cpp b/src/ledger/NetworkConfig.cpp index 33bca72cb4..e1ae2e43a0 100644 --- a/src/ledger/NetworkConfig.cpp +++ b/src/ledger/NetworkConfig.cpp @@ -461,72 +461,6 @@ updateCpuCostParamsEntryForV22(AbstractLedgerTxn& ltxRoot) { switch (val) { - // updating existing parameters changed in p22 - case VmInstantiation: - params[val] = - ContractCostParamEntry(ExtensionPoint{0}, 31271, 57504); - break; - case VmCachedInstantiation: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 40828, 680); - break; - case InvokeVmFunction: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 2149, 0); - break; - case ParseWasmInstructions: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 37421, 32); - break; - case ParseWasmFunctions: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 84156); - break; - case ParseWasmGlobals: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 163415); - break; - case ParseWasmTableEntries: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 29644); - break; - case ParseWasmTypes: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 893113); - break; - case ParseWasmDataSegments: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 184921); - break; - case ParseWasmElemSegments: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 312369); - break; - case ParseWasmImports: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 529255); - break; - case ParseWasmExports: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 361665); - break; - case ParseWasmDataSegmentBytes: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 14); - break; - case InstantiateWasmInstructions: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 43208, 0); - break; - case InstantiateWasmFunctions: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 8050); - break; - case InstantiateWasmGlobals: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 10647); - break; - case InstantiateWasmTableEntries: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 1933); - break; - case InstantiateWasmDataSegments: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 17164); - break; - case InstantiateWasmElemSegments: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 34261); - break; - case InstantiateWasmImports: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 746142); - break; - case InstantiateWasmExports: - params[val] = ContractCostParamEntry(ExtensionPoint{0}, 0, 296177); - break; - // adding new cost types introduced in p22 case Bls12381EncodeFp: params[val] = ContractCostParamEntry(ExtensionPoint{0}, 661, 0); @@ -889,54 +823,6 @@ updateMemCostParamsEntryForV22(AbstractLedgerTxn& ltxRoot) { switch (val) { - // updating existing parameters changed in p22 - case VmCachedInstantiation: - params[val] = - ContractCostParamEntry{ExtensionPoint{0}, 69472, 1478}; - break; - case InvokeVmFunction: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 15, 0}; - break; - case ParseWasmInstructions: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 13980, 215}; - break; - case ParseWasmFunctions: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 23056}; - break; - case ParseWasmGlobals: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 11924}; - break; - case ParseWasmTableEntries: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 6121}; - break; - case ParseWasmTypes: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 49554}; - break; - case ParseWasmDataSegments: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 5525}; - break; - case ParseWasmElemSegments: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 47034}; - break; - case ParseWasmImports: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 101762}; - break; - case ParseWasmExports: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 35491}; - break; - case ParseWasmDataSegmentBytes: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 129}; - break; - case InstantiateWasmInstructions: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 70792, 0}; - break; - case InstantiateWasmFunctions: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 17749}; - break; - case InstantiateWasmImports: - params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 98578}; - break; - // adding new cost types introduced in p22 case Bls12381EncodeFp: params[val] = ContractCostParamEntry{ExtensionPoint{0}, 0, 0}; From 903a1f29d19f1747fabd9085e702a5e873dcd304 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Thu, 3 Oct 2024 09:43:28 -0700 Subject: [PATCH 2/2] update test LCM --- ...ger-close-meta-v1-protocol-22-soroban.json | 12 +- .../ledger-close-meta-v1-protocol-22.json | 818 +++++++++--------- ...ger-close-meta-v1-protocol-23-soroban.json | 518 +++++------ .../ledger-close-meta-v1-protocol-23.json | 12 +- 4 files changed, 680 insertions(+), 680 deletions(-) diff --git a/src/testdata/ledger-close-meta-v1-protocol-22-soroban.json b/src/testdata/ledger-close-meta-v1-protocol-22-soroban.json index 724a1fb4b8..d46bba1e91 100644 --- a/src/testdata/ledger-close-meta-v1-protocol-22-soroban.json +++ b/src/testdata/ledger-close-meta-v1-protocol-22-soroban.json @@ -6,24 +6,24 @@ "v": 0 }, "ledgerHeader": { - "hash": "823cfdd8857bce214b9d00f8c58fe586318867c01ae4b2ec2fe64459de4f2e00", + "hash": "731c4791022bd35ba864642a7a1366ef37a2b7cb39ac2b23c1f9d0a3b6c0157d", "header": { "ledgerVersion": 22, - "previousLedgerHash": "d10889ce521eefaa0d52b01e6bdd874bf9b642a196e0ec848902c6ecdc64ab29", + "previousLedgerHash": "7b4668bf68d1c677cfa80cfe3e3aac5def6035a6033897eb63107df8198128b7", "scpValue": { - "txSetHash": "a54305ab82979a63eb45c8f5774514d75ce47f4838a5c661cf36a299807d11f3", + "txSetHash": "8198019d94ed679aea6b1097ba9b9dee32002f9568b7a6b23e1cf2b14d83bd54", "closeTime": 1451692800, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "38827a5a4922ae983f698bdc5b3c6cade71a620335530170af1cac6ab53f4cca6f2aece0b6ea64c413b9ba88ded7e827cbc60bddac74760fde5d52376a829e0f" + "signature": "a8e0f4e2153e0f492d65d8b44c0f8911f7c7eeefdb6affd3626e2eaec7ae2cda3e38019912ef1602b9f7fc2c5325ed792a72eef1276f098e5680a7d9a9308a08" } } }, "txSetResultHash": "c1f2e605905ad744b9dc6ac2cf506d00f08799f7a55f55e5bc0316ed1391773a", - "bucketListHash": "2497184ac85be1638a6275d9f0483c8d3dfc4ee988b0cf4dbedad8707ae6a8ec", + "bucketListHash": "183ca6ee7121692a6e8acc672e8fcc66c4787c7353191fc3879bd7adbc1b3717", "ledgerSeq": 28, "totalCoins": 1000000000000000000, "feePool": 804520, @@ -49,7 +49,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "d10889ce521eefaa0d52b01e6bdd874bf9b642a196e0ec848902c6ecdc64ab29", + "previousLedgerHash": "7b4668bf68d1c677cfa80cfe3e3aac5def6035a6033897eb63107df8198128b7", "phases": [ { "v": 0, diff --git a/src/testdata/ledger-close-meta-v1-protocol-22.json b/src/testdata/ledger-close-meta-v1-protocol-22.json index d4d51c0c3d..4e4c97350c 100644 --- a/src/testdata/ledger-close-meta-v1-protocol-22.json +++ b/src/testdata/ledger-close-meta-v1-protocol-22.json @@ -6,24 +6,24 @@ "v": 0 }, "ledgerHeader": { - "hash": "32b8163e121d55df3aa7d266de0b2a0a277027f37a975390bd380937df25aefc", + "hash": "2341d7975a9e6b34b3a0747ad6ae6638e0c516f7d717a0ecccab162ed3b67bdb", "header": { "ledgerVersion": 22, - "previousLedgerHash": "bb89ea8f08f1ed49aacbd38dc7463f48fa17f878f9b68b14127b841ff5208f5d", + "previousLedgerHash": "977a66c415a346e2f37169166515cd659ce92c667278e87f62e64cfb2fc801cf", "scpValue": { - "txSetHash": "5852fe84849a3a2d0b371347638bae15881f1c33f36b33688b2e62d695e0aefa", + "txSetHash": "ca0e9eb8e933aff12be1bb47059f6a8365f1693674e87e22b799ccb15a592aed", "closeTime": 0, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "ff5da6db3ae90ae3325d7d01df4c243ca9e51d6c083189aac3223db7f7a1c2f618a195b01d18795066f86b87970a929129cacb49a5cf2d62dcd6a9a7313ee50c" + "signature": "82f10c76b00ffd3737314bdcf34eab825506bc82ac40bca3a0c85b51254ea8b76bb87bf380f2994089e5b25f01d60e09081147b47517c17cafd4d7396ada7909" } } }, - "txSetResultHash": "249b974bacf8b5c4a8f0b5598194c1b9eca64af0b5c1506daa871c1533b6baac", - "bucketListHash": "13cb0fbc89ad6382f1af7871671ebccb5397a21ef4d061428fe86473f2abbdee", + "txSetResultHash": "f66233c106977a4cc148e019411ff6ddfaf76c337d004ed9a304a70407b161d0", + "bucketListHash": "be7c8d76cf6274260482c57a581f5b0c1dfb2a318665641393697a296bba994f", "ledgerSeq": 7, "totalCoins": 1000000000000000000, "feePool": 800, @@ -49,7 +49,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "bb89ea8f08f1ed49aacbd38dc7463f48fa17f878f9b68b14127b841ff5208f5d", + "previousLedgerHash": "977a66c415a346e2f37169166515cd659ce92c667278e87f62e64cfb2fc801cf", "phases": [ { "v": 0, @@ -185,22 +185,43 @@ "txProcessing": [ { "result": { - "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", + "transactionHash": "324d0628e2a215d367f181f0e3aacbaa26fa638e676e73fb9ad26a360314a7b7", "result": { - "feeCharged": 100, + "feeCharged": 300, "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } + "code": "txFEE_BUMP_INNER_SUCCESS", + "innerResultPair": { + "transactionHash": "b28c171f9658320b5ce8d50e4e1a36b74afbb2a92eec7df92a8981067131b025", + "result": { + "feeCharged": 200, + "result": { + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + }, + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + } + ] + }, + "ext": { + "v": 0 } } - ] + } }, "ext": { "v": 0 @@ -211,13 +232,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 4, "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989700, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 400000000, + "seqNum": 17179869184, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -225,31 +246,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -265,9 +262,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 17179869184, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -275,31 +272,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -323,9 +296,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 17179869184, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -333,31 +306,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -373,9 +322,61 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 17179869184, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 5, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 21474836480, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 7, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 21474836481, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -425,43 +426,18 @@ "state": { "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 399999900, - "seqNum": 12884901889, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 0, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -475,43 +451,18 @@ "updated": { "lastModifiedLedgerSeq": 7, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 400000900, - "seqNum": 12884901889, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -519,49 +470,28 @@ "v": 0 } } - }, + } + ] + }, + { + "changes": [ { "type": "LEDGER_ENTRY_STATE", "state": { "lastModifiedLedgerSeq": 7, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 7, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -575,43 +505,18 @@ "updated": { "lastModifiedLedgerSeq": 7, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999988600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 100, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 7, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -630,43 +535,22 @@ }, { "result": { - "transactionHash": "324d0628e2a215d367f181f0e3aacbaa26fa638e676e73fb9ad26a360314a7b7", + "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", "result": { - "feeCharged": 300, + "feeCharged": 100, "result": { - "code": "txFEE_BUMP_INNER_SUCCESS", - "innerResultPair": { - "transactionHash": "b28c171f9658320b5ce8d50e4e1a36b74afbb2a92eec7df92a8981067131b025", - "result": { - "feeCharged": 200, - "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - }, - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - } - ] - }, - "ext": { - "v": 0 + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } } } - } + ] }, "ext": { "v": 0 @@ -677,13 +561,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 4, + "lastModifiedLedgerSeq": 5, "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 400000000, - "seqNum": 17179869184, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989700, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -691,7 +575,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } }, @@ -707,9 +615,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 17179869184, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -717,85 +625,57 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - } - ], - "txApplyProcessing": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "txChangesBefore": [ - { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 7, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 17179869184, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], - "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { - "lastModifiedLedgerSeq": 7, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 17179869184, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, "ext": { - "v": 0 + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } } } - }, - "ext": { - "v": 0 } } }, + "ext": { + "v": 0 + } + } + } + ], + "txApplyProcessing": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "txChangesBefore": [ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 7, "data": { "type": "ACCOUNT", "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 21474836480, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -803,7 +683,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } }, @@ -819,9 +723,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 21474836481, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -871,18 +775,43 @@ "state": { "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 0, - "limit": 100, - "flags": 1, + "balance": 399999900, + "seqNum": 12884901889, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -896,18 +825,43 @@ "updated": { "lastModifiedLedgerSeq": 7, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "balance": 400000900, + "seqNum": 12884901889, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -915,28 +869,49 @@ "v": 0 } } - } - ] - }, - { - "changes": [ + }, { "type": "LEDGER_ENTRY_STATE", "state": { "lastModifiedLedgerSeq": 7, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 7, + "seqTime": 0 + } + } + } + } + } } } }, @@ -950,18 +925,43 @@ "updated": { "lastModifiedLedgerSeq": 7, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 100, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999988600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 7, + "seqTime": 0 + } + } + } + } + } } } }, diff --git a/src/testdata/ledger-close-meta-v1-protocol-23-soroban.json b/src/testdata/ledger-close-meta-v1-protocol-23-soroban.json index 6e5f068600..c7cbfc9ada 100644 --- a/src/testdata/ledger-close-meta-v1-protocol-23-soroban.json +++ b/src/testdata/ledger-close-meta-v1-protocol-23-soroban.json @@ -6,24 +6,24 @@ "v": 0 }, "ledgerHeader": { - "hash": "d6fa0b94f6fb862344f8566667a07567ed8916a886c2faea03f4e688769d3ac9", + "hash": "85a08b356fe8dd72e5ff999b7187f411103df3617c2b7085dbbca99587f9651a", "header": { "ledgerVersion": 23, - "previousLedgerHash": "95139917f8403ac97ac9673f3bb6f6d9d8329e55f860ffdcf4c2a6b526a9dccd", + "previousLedgerHash": "2b4f5fcff7bd087d4b6e7c6ded785c5ff466b3e0d6f304da8295c9a37197ed96", "scpValue": { - "txSetHash": "ac596842ef2ec3a0a2e2caf6ef3d319cf83c5de01390f8f6e45c0ca5d5bdd3c6", + "txSetHash": "24740b1ffa1584a68e5bed13068340cc8999577c9ab2eea2173c470d4a8a72d1", "closeTime": 1451692800, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "c7f0647c3f51ae8807e7195b503dd0d1491d86eaddecfff946bf7de5d9000ed57dc7ba28fbb4115d727d3b5ecaf83343b06ad0485b1cd7c793433cc3eeb4cf09" + "signature": "497d04432640e9de6ce91feb3723ea87d20a2c34ad9d6c1fe142e6a30e415213cde0ca12a4c514c4660f38a5c9b7151da5562da4c563bca8e7e0abbf39a31909" } } }, - "txSetResultHash": "5edc137152a404b1ea08e31b691098b8b8ab53a30041af25868849694535ecf5", - "bucketListHash": "6410bf4870203c1e71ec88462a655597e68bcdeb970cb167d73ca29be1903994", + "txSetResultHash": "65b6fe91abfe43ed98fa2163f08fdf3f2f3231101bba05102521186c25a1cc4b", + "bucketListHash": "8c1bdb45de59b67cfa87badc1b522439bea0cda2e6d453eb67212247ad441fd1", "ledgerSeq": 28, "totalCoins": 1000000000000000000, "feePool": 804520, @@ -49,7 +49,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "95139917f8403ac97ac9673f3bb6f6d9d8329e55f860ffdcf4c2a6b526a9dccd", + "previousLedgerHash": "2b4f5fcff7bd087d4b6e7c6ded785c5ff466b3e0d6f304da8295c9a37197ed96", "phases": [ { "v": 0, @@ -503,18 +503,18 @@ "txProcessing": [ { "result": { - "transactionHash": "364ec41dce0a678476ea3ebfc5caa28165ef3bf0976071d858b1c4044f187d25", + "transactionHash": "62d28c373389d447341e9d75bc84e2c91437169a2a70d3606c8b3aa7d198ef5c", "result": { - "feeCharged": 60559, + "feeCharged": 42954, "result": { - "code": "txSUCCESS", + "code": "txFAILED", "results": [ { "code": "opINNER", "tr": { - "type": "EXTEND_FOOTPRINT_TTL", - "extendFootprintTTLResult": { - "code": "EXTEND_FOOTPRINT_TTL_SUCCESS" + "type": "INVOKE_HOST_FUNCTION", + "invokeHostFunctionResult": { + "code": "INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED" } } } @@ -529,13 +529,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 9, + "lastModifiedLedgerSeq": 12, "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", "balance": 400000000, - "seqNum": 38654705664, + "seqNum": 51539607552, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -559,9 +559,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 398999900, - "seqNum": 38654705664, + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "balance": 398956045, + "seqNum": 51539607552, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -593,9 +593,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 398999900, - "seqNum": 38654705664, + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "balance": 398956045, + "seqNum": 51539607552, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -619,9 +619,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 398999900, - "seqNum": 38654705665, + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "balance": 398956045, + "seqNum": 51539607553, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -663,76 +663,7 @@ } } ], - "operations": [ - { - "changes": [ - { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 6, - "data": { - "type": "TTL", - "ttl": { - "keyHash": "091ddece931776a53f93869b82c24e132cc12d00d961fac09bc3b9cb9021c62d", - "liveUntilLedgerSeq": 10006 - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { - "lastModifiedLedgerSeq": 28, - "data": { - "type": "TTL", - "ttl": { - "keyHash": "091ddece931776a53f93869b82c24e132cc12d00d961fac09bc3b9cb9021c62d", - "liveUntilLedgerSeq": 10028 - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 6, - "data": { - "type": "TTL", - "ttl": { - "keyHash": "60313f9b273db0b14c3e503cf6cc152dd14a0c57e5e81a23e86b4e27a23a2c06", - "liveUntilLedgerSeq": 10006 - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { - "lastModifiedLedgerSeq": 28, - "data": { - "type": "TTL", - "ttl": { - "keyHash": "60313f9b273db0b14c3e503cf6cc152dd14a0c57e5e81a23e86b4e27a23a2c06", - "liveUntilLedgerSeq": 10028 - } - }, - "ext": { - "v": 0 - } - } - } - ] - } - ], + "operations": [], "txChangesAfter": [ { "type": "LEDGER_ENTRY_STATE", @@ -741,9 +672,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 398999900, - "seqNum": 38654705665, + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "balance": 398956045, + "seqNum": 51539607553, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -791,9 +722,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399939441, - "seqNum": 38654705665, + "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "balance": 399957046, + "seqNum": 51539607553, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -851,19 +782,18 @@ }, { "result": { - "transactionHash": "e310227a8c0d8d1f78632e65ebca281cd60d8619c9afc64491bcce98e7cd7ee3", + "transactionHash": "bb0a6b13caea6b015555dfd332aca1099e8654896bf7d1bcce8432e833a2572a", "result": { - "feeCharged": 106775, + "feeCharged": 61612, "result": { - "code": "txSUCCESS", + "code": "txFAILED", "results": [ { "code": "opINNER", "tr": { "type": "INVOKE_HOST_FUNCTION", "invokeHostFunctionResult": { - "code": "INVOKE_HOST_FUNCTION_SUCCESS", - "success": "cbbc48750debb8535093b3deaf88ac7f4cff87425576a58de2bac754acdb4616" + "code": "INVOKE_HOST_FUNCTION_TRAPPED" } } } @@ -878,13 +808,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 10, + "lastModifiedLedgerSeq": 11, "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", "balance": 400000000, - "seqNum": 42949672960, + "seqNum": 47244640256, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -908,9 +838,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", - "balance": 399873274, - "seqNum": 42949672960, + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "balance": 399898388, + "seqNum": 47244640256, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -942,9 +872,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", - "balance": 399873274, - "seqNum": 42949672960, + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "balance": 399898388, + "seqNum": 47244640256, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -968,9 +898,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", - "balance": 399873274, - "seqNum": 42949672961, + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "balance": 399898388, + "seqNum": 47244640257, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1012,55 +942,7 @@ } } ], - "operations": [ - { - "changes": [ - { - "type": "LEDGER_ENTRY_CREATED", - "created": { - "lastModifiedLedgerSeq": 28, - "data": { - "type": "CONTRACT_DATA", - "contractData": { - "ext": { - "v": 0 - }, - "contract": "CAA3QKIP2SNVXUJTB4HKOGF55JTSSMQGED3FZYNHMNSXYV3DRRMAWA3Y", - "key": { - "type": "SCV_SYMBOL", - "sym": "key" - }, - "durability": "PERSISTENT", - "val": { - "type": "SCV_U64", - "u64": 42 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_CREATED", - "created": { - "lastModifiedLedgerSeq": 28, - "data": { - "type": "TTL", - "ttl": { - "keyHash": "764f4e59e20ac1a357f9f26ab0eaf46d196ab74822db44f039353a6f114864aa", - "liveUntilLedgerSeq": 47 - } - }, - "ext": { - "v": 0 - } - } - } - ] - } - ], + "operations": [], "txChangesAfter": [ { "type": "LEDGER_ENTRY_STATE", @@ -1069,9 +951,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", - "balance": 399873274, - "seqNum": 42949672961, + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "balance": 399898388, + "seqNum": 47244640257, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1119,9 +1001,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", - "balance": 399893225, - "seqNum": 42949672961, + "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "balance": 399938388, + "seqNum": 47244640257, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1169,7 +1051,8 @@ }, "events": [], "returnValue": { - "type": "SCV_VOID" + "type": "SCV_BOOL", + "b": "FALSE" }, "diagnosticEvents": [] } @@ -1178,18 +1061,19 @@ }, { "result": { - "transactionHash": "ee68d27257fa137933de22b3fdfbc4a736ec01af29a9e25e5b807252b1a1ca0a", + "transactionHash": "e310227a8c0d8d1f78632e65ebca281cd60d8619c9afc64491bcce98e7cd7ee3", "result": { - "feeCharged": 51547, + "feeCharged": 106775, "result": { "code": "txSUCCESS", "results": [ { "code": "opINNER", "tr": { - "type": "RESTORE_FOOTPRINT", - "restoreFootprintResult": { - "code": "RESTORE_FOOTPRINT_SUCCESS" + "type": "INVOKE_HOST_FUNCTION", + "invokeHostFunctionResult": { + "code": "INVOKE_HOST_FUNCTION_SUCCESS", + "success": "cbbc48750debb8535093b3deaf88ac7f4cff87425576a58de2bac754acdb4616" } } } @@ -1204,13 +1088,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 8, + "lastModifiedLedgerSeq": 10, "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", "balance": 400000000, - "seqNum": 34359738368, + "seqNum": 42949672960, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1234,9 +1118,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 398999900, - "seqNum": 34359738368, + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "balance": 399873274, + "seqNum": 42949672960, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1268,9 +1152,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 398999900, - "seqNum": 34359738368, + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "balance": 399873274, + "seqNum": 42949672960, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1294,9 +1178,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 398999900, - "seqNum": 34359738369, + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "balance": 399873274, + "seqNum": 42949672961, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1342,14 +1226,25 @@ { "changes": [ { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 7, + "type": "LEDGER_ENTRY_CREATED", + "created": { + "lastModifiedLedgerSeq": 28, "data": { - "type": "TTL", - "ttl": { - "keyHash": "4791962cd1e2c7b8f8af3f96514f9777f0156a48261fb885a571a7f69b33a058", - "liveUntilLedgerSeq": 26 + "type": "CONTRACT_DATA", + "contractData": { + "ext": { + "v": 0 + }, + "contract": "CAA3QKIP2SNVXUJTB4HKOGF55JTSSMQGED3FZYNHMNSXYV3DRRMAWA3Y", + "key": { + "type": "SCV_SYMBOL", + "sym": "key" + }, + "durability": "PERSISTENT", + "val": { + "type": "SCV_U64", + "u64": 42 + } } }, "ext": { @@ -1358,13 +1253,13 @@ } }, { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { + "type": "LEDGER_ENTRY_CREATED", + "created": { "lastModifiedLedgerSeq": 28, "data": { "type": "TTL", "ttl": { - "keyHash": "4791962cd1e2c7b8f8af3f96514f9777f0156a48261fb885a571a7f69b33a058", + "keyHash": "764f4e59e20ac1a357f9f26ab0eaf46d196ab74822db44f039353a6f114864aa", "liveUntilLedgerSeq": 47 } }, @@ -1384,9 +1279,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 398999900, - "seqNum": 34359738369, + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "balance": 399873274, + "seqNum": 42949672961, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1434,9 +1329,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 399948453, - "seqNum": 34359738369, + "accountID": "GDWWCIR2FIWTY2D3CEDXZYRTRNTFZCC5PBCGC6XPMKCLUV7BRG2AT3RD", + "balance": 399893225, + "seqNum": 42949672961, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1484,8 +1379,7 @@ }, "events": [], "returnValue": { - "type": "SCV_BOOL", - "b": "FALSE" + "type": "SCV_VOID" }, "diagnosticEvents": [] } @@ -1494,18 +1388,18 @@ }, { "result": { - "transactionHash": "62d28c373389d447341e9d75bc84e2c91437169a2a70d3606c8b3aa7d198ef5c", + "transactionHash": "364ec41dce0a678476ea3ebfc5caa28165ef3bf0976071d858b1c4044f187d25", "result": { - "feeCharged": 42954, + "feeCharged": 60559, "result": { - "code": "txFAILED", + "code": "txSUCCESS", "results": [ { "code": "opINNER", "tr": { - "type": "INVOKE_HOST_FUNCTION", - "invokeHostFunctionResult": { - "code": "INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED" + "type": "EXTEND_FOOTPRINT_TTL", + "extendFootprintTTLResult": { + "code": "EXTEND_FOOTPRINT_TTL_SUCCESS" } } } @@ -1520,13 +1414,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 12, + "lastModifiedLedgerSeq": 9, "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", "balance": 400000000, - "seqNum": 51539607552, + "seqNum": 38654705664, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1550,9 +1444,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", - "balance": 398956045, - "seqNum": 51539607552, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 398999900, + "seqNum": 38654705664, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1584,9 +1478,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", - "balance": 398956045, - "seqNum": 51539607552, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 398999900, + "seqNum": 38654705664, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1610,9 +1504,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", - "balance": 398956045, - "seqNum": 51539607553, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 398999900, + "seqNum": 38654705665, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1654,7 +1548,76 @@ } } ], - "operations": [], + "operations": [ + { + "changes": [ + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 6, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "091ddece931776a53f93869b82c24e132cc12d00d961fac09bc3b9cb9021c62d", + "liveUntilLedgerSeq": 10006 + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 28, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "091ddece931776a53f93869b82c24e132cc12d00d961fac09bc3b9cb9021c62d", + "liveUntilLedgerSeq": 10028 + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 6, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "60313f9b273db0b14c3e503cf6cc152dd14a0c57e5e81a23e86b4e27a23a2c06", + "liveUntilLedgerSeq": 10006 + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 28, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "60313f9b273db0b14c3e503cf6cc152dd14a0c57e5e81a23e86b4e27a23a2c06", + "liveUntilLedgerSeq": 10028 + } + }, + "ext": { + "v": 0 + } + } + } + ] + } + ], "txChangesAfter": [ { "type": "LEDGER_ENTRY_STATE", @@ -1663,9 +1626,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", - "balance": 398956045, - "seqNum": 51539607553, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 398999900, + "seqNum": 38654705665, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1713,9 +1676,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GA2NXNEE2MHWGQP5XXACPYG2BDZFPKGYPFNST5V3ZZN75NSLQAEXX7CU", - "balance": 399957046, - "seqNum": 51539607553, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399939441, + "seqNum": 38654705665, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1773,18 +1736,18 @@ }, { "result": { - "transactionHash": "bb0a6b13caea6b015555dfd332aca1099e8654896bf7d1bcce8432e833a2572a", + "transactionHash": "ee68d27257fa137933de22b3fdfbc4a736ec01af29a9e25e5b807252b1a1ca0a", "result": { - "feeCharged": 61612, + "feeCharged": 51547, "result": { - "code": "txFAILED", + "code": "txSUCCESS", "results": [ { "code": "opINNER", "tr": { - "type": "INVOKE_HOST_FUNCTION", - "invokeHostFunctionResult": { - "code": "INVOKE_HOST_FUNCTION_TRAPPED" + "type": "RESTORE_FOOTPRINT", + "restoreFootprintResult": { + "code": "RESTORE_FOOTPRINT_SUCCESS" } } } @@ -1799,13 +1762,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 11, + "lastModifiedLedgerSeq": 8, "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", "balance": 400000000, - "seqNum": 47244640256, + "seqNum": 34359738368, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1829,9 +1792,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", - "balance": 399898388, - "seqNum": 47244640256, + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "balance": 398999900, + "seqNum": 34359738368, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1863,9 +1826,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", - "balance": 399898388, - "seqNum": 47244640256, + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "balance": 398999900, + "seqNum": 34359738368, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1889,9 +1852,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", - "balance": 399898388, - "seqNum": 47244640257, + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "balance": 398999900, + "seqNum": 34359738369, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1933,7 +1896,44 @@ } } ], - "operations": [], + "operations": [ + { + "changes": [ + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 7, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "4791962cd1e2c7b8f8af3f96514f9777f0156a48261fb885a571a7f69b33a058", + "liveUntilLedgerSeq": 26 + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 28, + "data": { + "type": "TTL", + "ttl": { + "keyHash": "4791962cd1e2c7b8f8af3f96514f9777f0156a48261fb885a571a7f69b33a058", + "liveUntilLedgerSeq": 47 + } + }, + "ext": { + "v": 0 + } + } + } + ] + } + ], "txChangesAfter": [ { "type": "LEDGER_ENTRY_STATE", @@ -1942,9 +1942,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", - "balance": 399898388, - "seqNum": 47244640257, + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "balance": 398999900, + "seqNum": 34359738369, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -1992,9 +1992,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GAM4XNEHJUHN7VE3ZWJI23R2WS3SJS2BTUHZAC6XICXLXO2HPX4QI2IR", - "balance": 399938388, - "seqNum": 47244640257, + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "balance": 399948453, + "seqNum": 34359738369, "numSubEntries": 0, "inflationDest": null, "flags": 0, diff --git a/src/testdata/ledger-close-meta-v1-protocol-23.json b/src/testdata/ledger-close-meta-v1-protocol-23.json index fd3457ad4a..182097130e 100644 --- a/src/testdata/ledger-close-meta-v1-protocol-23.json +++ b/src/testdata/ledger-close-meta-v1-protocol-23.json @@ -6,24 +6,24 @@ "v": 0 }, "ledgerHeader": { - "hash": "639105c0b5e96988a119fc5c29302a0d159a4db6b110072ef76d9874ae32e965", + "hash": "544367e4a7271f352eb91566e9e748ed03246b8a445bda3c70b1e93e3d751f7b", "header": { "ledgerVersion": 23, - "previousLedgerHash": "6f164987c6cf8b0c244e5408f7bc1d46d8bd06fc4738cd5d4ffa3f86d26735db", + "previousLedgerHash": "a8fa722c806905e1bf3b3cb7750db78031ad228c2812d2a3479b06db95b0bd43", "scpValue": { - "txSetHash": "963aafcdb15b43e8c4bc65ab3c619ca2deb88ebd085f7fab83e8c9bd62b98924", + "txSetHash": "969ab56f99763716d1fc4480bfe27bb5dfaaf1666dd44cdcd6c51d8fc9074d2c", "closeTime": 0, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "f5df08c23029f2ca25758b8063404551c2cc8498eda3f9b456d1279f6109e9e76319089295c57e810cfe613aea46ab131f00b59c31674be946f1d83a54bafb01" + "signature": "f6f4db8cc07c1d2f07f95b0b221a8ce55ae214dc51d82a71432352e6b3a4583b5930f643110a18bec0684d884d68d066ef3d0a051019f74648f9ef38d17c5707" } } }, "txSetResultHash": "f66233c106977a4cc148e019411ff6ddfaf76c337d004ed9a304a70407b161d0", - "bucketListHash": "ab54afd2e5801cd428b32662bb8d5efb10c979ab8538d635b9fad411a2317aaa", + "bucketListHash": "e9db6e23db1e6a733b8d285e5ca8eab8c3b6b7d8d1bace90afe02df7ce0dbecb", "ledgerSeq": 7, "totalCoins": 1000000000000000000, "feePool": 800, @@ -49,7 +49,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "6f164987c6cf8b0c244e5408f7bc1d46d8bd06fc4738cd5d4ffa3f86d26735db", + "previousLedgerHash": "a8fa722c806905e1bf3b3cb7750db78031ad228c2812d2a3479b06db95b0bd43", "phases": [ { "v": 0,