Skip to content

Commit

Permalink
Populate detailed Soroban resource fee information in tx meta
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkozh committed Mar 25, 2024
1 parent 87389fa commit 409e679
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 36 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/protocol-curr/xdr
Submodule xdr updated 1 files
+43 −1 Stellar-ledger.x
2 changes: 1 addition & 1 deletion src/protocol-next/xdr
Submodule xdr updated 1 files
+43 −1 Stellar-ledger.x
6 changes: 3 additions & 3 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ itertools = "=0.11.0"
version = "=20.3.0"
git = "https://github.com/stellar/rs-soroban-env"
package = "soroban-env-host"
rev = "74c3c045b7e607cfda9155c1bc00e897b5e5a19f"
rev = "93120b6b32cd910fcc224cbf6aec1333f771a8bc"

# This copy of the soroban host is _optional_ and only enabled during protocol
# transitions. When transitioning from protocol N to N+1, the `curr` copy
Expand Down Expand Up @@ -65,12 +65,12 @@ rev = "1bfc0f2a2ee134efc1e1b0d5270281d0cba61c2e"
[dependencies.soroban-test-wasms]
version = "=20.3.0"
git = "https://github.com/stellar/rs-soroban-env"
rev = "74c3c045b7e607cfda9155c1bc00e897b5e5a19f"
rev = "93120b6b32cd910fcc224cbf6aec1333f771a8bc"

[dependencies.soroban-synth-wasm]
version = "=20.3.0"
git = "https://github.com/stellar/rs-soroban-env"
rev = "74c3c045b7e607cfda9155c1bc00e897b5e5a19f"
rev = "93120b6b32cd910fcc224cbf6aec1333f771a8bc"

[dependencies.cargo-lock]
version = "=9.0.0"
Expand Down
12 changes: 6 additions & 6 deletions src/rust/src/host-dep-tree-curr.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
soroban-env-host 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c045b7e607cfda9155c1bc00e897b5e5a19f#74c3c045b7e607cfda9155c1bc00e897b5e5a19f
soroban-env-host 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=93120b6b32cd910fcc224cbf6aec1333f771a8bc#93120b6b32cd910fcc224cbf6aec1333f771a8bc
├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608
│ ├── tracy-client-sys 0.20.0 checksum:e8cf8aeb20e40d13be65a0b134f8d82d360e72b2793a11de8867d7fbc0f9d6f6
│ │ └── cc 1.0.79 checksum:50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f
Expand Down Expand Up @@ -97,19 +97,19 @@ soroban-env-host 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c0
│ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=0ed3f3dee30dc41ebe21972399e0a73a41944aa0#0ed3f3dee30dc41ebe21972399e0a73a41944aa0
│ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67
│ └── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0
├── soroban-env-common 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c045b7e607cfda9155c1bc00e897b5e5a19f#74c3c045b7e607cfda9155c1bc00e897b5e5a19f
├── soroban-env-common 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=93120b6b32cd910fcc224cbf6aec1333f771a8bc#93120b6b32cd910fcc224cbf6aec1333f771a8bc
│ ├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608
│ ├── stellar-xdr 20.1.0 git+https://github.com/stellar/rs-stellar-xdr?rev=8febe921e0b9c157bb7505e0e3149c08771129a5#8febe921e0b9c157bb7505e0e3149c08771129a5
│ ├── stellar-xdr 20.1.0 git+https://github.com/stellar/rs-stellar-xdr?rev=2e0f7f7d42fcd6c3c42eb0d65570fba9f5193d7e#2e0f7f7d42fcd6c3c42eb0d65570fba9f5193d7e
│ │ ├── stellar-strkey 0.0.8 checksum:12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd
│ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70
│ │ ├── escape-bytes 0.1.1 checksum:2bfcf67fea2815c2fc3b90873fae90957be12ff417335dfadc7f52927feb03b2
│ │ ├── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
│ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8
│ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f
│ ├── soroban-wasmi 0.31.1-soroban.20.0.1 git+https://github.com/stellar/wasmi?rev=0ed3f3dee30dc41ebe21972399e0a73a41944aa0#0ed3f3dee30dc41ebe21972399e0a73a41944aa0
│ ├── soroban-env-macros 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c045b7e607cfda9155c1bc00e897b5e5a19f#74c3c045b7e607cfda9155c1bc00e897b5e5a19f
│ ├── soroban-env-macros 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=93120b6b32cd910fcc224cbf6aec1333f771a8bc#93120b6b32cd910fcc224cbf6aec1333f771a8bc
│ │ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
│ │ ├── stellar-xdr 20.1.0 git+https://github.com/stellar/rs-stellar-xdr?rev=8febe921e0b9c157bb7505e0e3149c08771129a5#8febe921e0b9c157bb7505e0e3149c08771129a5
│ │ ├── stellar-xdr 20.1.0 git+https://github.com/stellar/rs-stellar-xdr?rev=2e0f7f7d42fcd6c3c42eb0d65570fba9f5193d7e#2e0f7f7d42fcd6c3c42eb0d65570fba9f5193d7e
│ │ ├── serde_json 1.0.108 checksum:3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b
│ │ ├── serde 1.0.192 checksum:bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001
│ │ ├── quote 1.0.33 checksum:5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
Expand All @@ -123,7 +123,7 @@ soroban-env-host 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c0
│ │ └── proc-macro2 1.0.69 checksum:134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da
│ ├── ethnum 1.5.0 checksum:b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c
│ └── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
├── soroban-builtin-sdk-macros 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=74c3c045b7e607cfda9155c1bc00e897b5e5a19f#74c3c045b7e607cfda9155c1bc00e897b5e5a19f
├── soroban-builtin-sdk-macros 20.3.0 git+https://github.com/stellar/rs-soroban-env?rev=93120b6b32cd910fcc224cbf6aec1333f771a8bc#93120b6b32cd910fcc224cbf6aec1333f771a8bc
│ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
│ ├── quote 1.0.33 checksum:5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
│ ├── proc-macro2 1.0.69 checksum:134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da
Expand Down
50 changes: 45 additions & 5 deletions src/testdata/ledger-close-meta-v1-protocol-20-soroban.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,15 @@
],
"sorobanMeta": {
"ext": {
"v": 0
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 42846,
"totalRefundableResourceFeeCharged": 0,
"rentFeeCharged": 0
}
},
"events": [],
"returnValue": {
Expand Down Expand Up @@ -1052,7 +1060,15 @@
],
"sorobanMeta": {
"ext": {
"v": 0
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 61512,
"totalRefundableResourceFeeCharged": 0,
"rentFeeCharged": 0
}
},
"events": [],
"returnValue": {
Expand Down Expand Up @@ -1368,7 +1384,15 @@
],
"sorobanMeta": {
"ext": {
"v": 0
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 31399,
"totalRefundableResourceFeeCharged": 20048,
"rentFeeCharged": 20048
}
},
"events": [],
"returnValue": {
Expand Down Expand Up @@ -1696,7 +1720,15 @@
],
"sorobanMeta": {
"ext": {
"v": 0
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 86626,
"totalRefundableResourceFeeCharged": 20049,
"rentFeeCharged": 20048
}
},
"events": [],
"returnValue": {
Expand Down Expand Up @@ -2043,7 +2075,15 @@
],
"sorobanMeta": {
"ext": {
"v": 0
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 20363,
"totalRefundableResourceFeeCharged": 40096,
"rentFeeCharged": 40096
}
},
"events": [],
"returnValue": {
Expand Down
40 changes: 38 additions & 2 deletions src/testdata/ledger-close-meta-v1-protocol-20.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,25 @@
}
],
"txChangesAfter": [],
"sorobanMeta": null
"sorobanMeta": {
"ext": {
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 0,
"totalRefundableResourceFeeCharged": 0,
"rentFeeCharged": 0
}
},
"events": [],
"returnValue": {
"type": "SCV_BOOL",
"b": "FALSE"
},
"diagnosticEvents": []
}
}
}
},
Expand Down Expand Up @@ -980,7 +998,25 @@
}
],
"txChangesAfter": [],
"sorobanMeta": null
"sorobanMeta": {
"ext": {
"v": 1,
"v1": {
"ext": {
"v": 0
},
"totalNonRefundableResourceFeeCharged": 0,
"totalRefundableResourceFeeCharged": 0,
"rentFeeCharged": 0
}
},
"events": [],
"returnValue": {
"type": "SCV_BOOL",
"b": "FALSE"
},
"diagnosticEvents": []
}
}
}
}
Expand Down
Loading

0 comments on commit 409e679

Please sign in to comment.