Skip to content

Commit

Permalink
Merge pull request #3908 from sisuresh/bump-env
Browse files Browse the repository at this point in the history
Bump env

Reviewed-by: graydon
  • Loading branch information
latobarita authored Sep 5, 2023
2 parents 9bfb886 + 84d9db0 commit 2b283bd
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 53 deletions.
53 changes: 20 additions & 33 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/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ stellar_core_LDADD += $(LIBRUST_STELLAR_CORE) -ldl

$(RUST_CXXBRIDGE):
mkdir -p $(RUST_BIN_DIR)
$(CARGO) install --root $(RUST_BUILD_DIR) cxxbridge-cmd --version 1.0.68
CARGO_HTTP_MULTIPLEXING=false $(CARGO) install --root $(RUST_BUILD_DIR) cxxbridge-cmd --version 1.0.68

rust/RustBridge.h: rust/src/lib.rs $(SRC_RUST_FILES) Makefile $(RUST_CXXBRIDGE)
$(RUST_CXXBRIDGE) $< --header --output $@.tmp
Expand Down
6 changes: 3 additions & 3 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rustc-simple-version = "0.1.0"
version = "0.0.17"
git = "https://github.com/stellar/rs-soroban-env"
package = "soroban-env-host"
rev = "eb5a9ba053a7b64a8eff605db625525378f7bea0"
rev = "3d6c35d1308fc36a05d30d257756e42fc928b537"

# 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 All @@ -52,11 +52,11 @@ optional = true
version = "0.0.17"
git = "https://github.com/stellar/rs-soroban-env"
package = "soroban-env-host"
rev = "ee3896617f5eeb06d6346e2fbf70cb44d0823b27"
rev = "eb5a9ba053a7b64a8eff605db625525378f7bea0"

[dependencies.soroban-test-wasms]
git = "https://github.com/stellar/rs-soroban-env"
rev = "eb5a9ba053a7b64a8eff605db625525378f7bea0"
rev = "3d6c35d1308fc36a05d30d257756e42fc928b537"

[dependencies.cargo-lock]
git = "https://github.com/rustsec/rustsec"
Expand Down
11 changes: 4 additions & 7 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 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9ba053a7b64a8eff605db625525378f7bea0#eb5a9ba053a7b64a8eff605db625525378f7bea0
soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=3d6c35d1308fc36a05d30d257756e42fc928b537#3d6c35d1308fc36a05d30d257756e42fc928b537
├── 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 @@ -86,13 +86,13 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9b
│ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4
│ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67
│ └── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0
├── soroban-native-sdk-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9ba053a7b64a8eff605db625525378f7bea0#eb5a9ba053a7b64a8eff605db625525378f7bea0
├── soroban-native-sdk-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=3d6c35d1308fc36a05d30d257756e42fc928b537#3d6c35d1308fc36a05d30d257756e42fc928b537
│ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e
│ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488
│ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406
│ └── itertools 0.10.5 checksum:b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473
│ └── either 1.8.1 checksum:7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91
├── soroban-env-common 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9ba053a7b64a8eff605db625525378f7bea0#eb5a9ba053a7b64a8eff605db625525378f7bea0
├── soroban-env-common 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=3d6c35d1308fc36a05d30d257756e42fc928b537#3d6c35d1308fc36a05d30d257756e42fc928b537
│ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=39904e09941046dab61e6e35fc89e31bf2dea1cd#39904e09941046dab61e6e35fc89e31bf2dea1cd
│ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70
│ │ ├── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
Expand All @@ -109,7 +109,7 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9b
│ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8
│ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f
│ ├── soroban-wasmi 0.30.0-soroban git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4
│ ├── soroban-env-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9ba053a7b64a8eff605db625525378f7bea0#eb5a9ba053a7b64a8eff605db625525378f7bea0
│ ├── soroban-env-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=3d6c35d1308fc36a05d30d257756e42fc928b537#3d6c35d1308fc36a05d30d257756e42fc928b537
│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e
│ │ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=39904e09941046dab61e6e35fc89e31bf2dea1cd#39904e09941046dab61e6e35fc89e31bf2dea1cd
│ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a
Expand Down Expand Up @@ -178,7 +178,6 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9b
│ ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd
│ └── autocfg 1.1.0 checksum:d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa
├── num-derive 0.4.0 checksum:9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e
├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4
├── k256 0.13.1 checksum:cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc
│ ├── signature 2.1.0 checksum:5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500
│ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c
Expand Down Expand Up @@ -229,7 +228,6 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9b
│ │ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292
│ │ └── der 0.7.6 checksum:56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17
│ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70
├── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427
├── ed25519-dalek 2.0.0 checksum:7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980
│ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9
Expand All @@ -254,7 +252,6 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=eb5a9b
│ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406
│ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c
│ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
├── curve25519-dalek 4.0.0 checksum:f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2
└── backtrace 0.3.67 checksum:233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca
├── rustc-demangle 0.1.23 checksum:d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76
├── object 0.30.4 checksum:03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385
Expand Down
18 changes: 9 additions & 9 deletions src/transactions/test/InvokeHostFunctionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Restore Instance and WASM
restoreOp(contractKeys,
127 /* rent bump */ + 40000 /* two LE-writes */);
163 /* rent bump */ + 40000 /* two LE-writes */);

// Instance should now be useable
putWithFootprint(
Expand All @@ -1207,7 +1207,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Only restore contract instance
restoreOp({contractKeys[0]},
38 /* rent bump */ + 20000 /* one LE write */);
49 /* rent bump */ + 20000 /* one LE write */);

// invocation should fail
putWithFootprint(
Expand All @@ -1225,7 +1225,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Only restore WASM
restoreOp({contractKeys[1]},
90 /* rent bump */ + 20000 /* one LE write */);
114 /* rent bump */ + 20000 /* one LE write */);

// invocation should fail
putWithFootprint(
Expand All @@ -1243,16 +1243,16 @@ TEST_CASE("contract storage", "[tx][soroban]")
{
// Restore Instance and WASM
restoreOp(contractKeys,
127 /* rent bump */ + 40000 /* two LE writes */);
163 /* rent bump */ + 40000 /* two LE writes */);

auto instanceBumpAmount = 10'000;
auto wasmBumpAmount = 15'000;

// bump instance
bumpOp(instanceBumpAmount, {contractKeys[0]}, 20039);
bumpOp(instanceBumpAmount, {contractKeys[0]}, 20050);

// bump WASM
bumpOp(wasmBumpAmount, {contractKeys[1]}, 20178);
bumpOp(wasmBumpAmount, {contractKeys[1]}, 20225);

checkEntry(contractKeys[0], ledgerSeq + instanceBumpAmount);
checkEntry(contractKeys[1], ledgerSeq + wasmBumpAmount);
Expand Down Expand Up @@ -1362,7 +1362,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
ContractDataDurability::PERSISTENT),
contractDataKey(contractID, makeSymbolSCVal("key3"),
ContractDataDurability::PERSISTENT)},
40074); // only 2 ledger writes because key3 won't be bumped
40097); // only 2 ledger writes because key3 won't be bumped

checkContractDataExpirationLedger(
"key", ContractDataDurability::PERSISTENT, ledgerSeq + 10'100);
Expand Down Expand Up @@ -1420,7 +1420,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
1;

// Bump instance and WASM so that they don't expire during the test
bumpOp(10'000, contractKeys, 40151);
bumpOp(10'000, contractKeys, 40194);

put("key", 0, ContractDataDurability::PERSISTENT);
checkContractDataExpirationLedger(
Expand Down Expand Up @@ -1462,7 +1462,7 @@ TEST_CASE("contract storage", "[tx][soroban]")
"key", ContractDataDurability::PERSISTENT, initExpirationLedger);

// Restore the entry
restoreOp({lk}, 20038);
restoreOp({lk}, 20049);

ledgerSeq = getLedgerSeq(*app);
checkContractDataExpirationState(
Expand Down

0 comments on commit 2b283bd

Please sign in to comment.