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

Bump soroban-env-host versions #3890

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions Cargo.lock

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

31 changes: 16 additions & 15 deletions src/herder/test/HerderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,9 +1590,8 @@ TEST_CASE("surge pricing", "[herder][txset]")
cfg.mLedgerMaxTxCount = 0;
});
SorobanResources resources;
auto sorobanTx =
createUploadWasmTx(*app, root, baseFee,
/* refundableFee */ 1200, resources);
auto sorobanTx = createUploadWasmTx(
*app, root, baseFee, DEFAULT_TEST_REFUNDABLE_FEE, resources);

TxSetFrame::TxPhases invalidTxs;
invalidTxs.resize(2);
Expand Down Expand Up @@ -1648,9 +1647,8 @@ TEST_CASE("surge pricing", "[herder][txset]")
resources.instructions = 800'000;
resources.readBytes = conf.txMaxReadBytes();
resources.writeBytes = 1000;
auto sorobanTx =
createUploadWasmTx(*app, acc2, baseFee,
/* refundableFee */ 1200, resources);
auto sorobanTx = createUploadWasmTx(
*app, acc2, baseFee, DEFAULT_TEST_REFUNDABLE_FEE, resources);

auto generateTxs = [&](std::vector<TestAccount>& accounts,
SorobanNetworkConfig conf) {
Expand Down Expand Up @@ -1702,15 +1700,15 @@ TEST_CASE("surge pricing", "[herder][txset]")
{
// Fee too small
invalidSoroban = createUploadWasmTx(
*app, acc2, 100, /* refundableFee */ 1200, resources);
*app, acc2, 100, DEFAULT_TEST_REFUNDABLE_FEE, resources);
}
SECTION("invalid resource")
{
// Too many instructions
resources.instructions = UINT32_MAX;
invalidSoroban =
createUploadWasmTx(*app, acc2, baseFee,
/* refundableFee */ 1200, resources);
DEFAULT_TEST_REFUNDABLE_FEE, resources);
}
TxSetFrame::TxPhases invalidPhases;
invalidPhases.resize(2);
Expand Down Expand Up @@ -1750,8 +1748,9 @@ TEST_CASE("surge pricing", "[herder][txset]")
SECTION("soroban surge pricing, classic unaffected")
{
// Another soroban tx with higher fee, which will be selected
auto sorobanTxHighFee = createUploadWasmTx(
*app, acc3, baseFee * 2, /* refundableFee */ 1200, resources);
auto sorobanTxHighFee =
createUploadWasmTx(*app, acc3, baseFee * 2,
DEFAULT_TEST_REFUNDABLE_FEE, resources);
TxSetFrame::TxPhases invalidPhases;
invalidPhases.resize(2);
TxSetFrameConstPtr txSet = TxSetFrame::makeFromTransactions(
Expand All @@ -1776,17 +1775,19 @@ TEST_CASE("surge pricing", "[herder][txset]")
// Another soroban tx with high fee and a bit less resources
// Still half capacity available
resources.readBytes = conf.txMaxReadBytes() / 2;
auto sorobanTxHighFee = createUploadWasmTx(
*app, acc3, baseFee * 2, /* refundableFee */ 1200, resources);
auto sorobanTxHighFee =
createUploadWasmTx(*app, acc3, baseFee * 2,
DEFAULT_TEST_REFUNDABLE_FEE, resources);

// Create another small soroban tx, with small fee. It should be
// picked up anyway since we can't fit sorobanTx (gaps are allowed)
resources.instructions = 1;
resources.readBytes = 1;
resources.writeBytes = 1;

auto smallSorobanLowFee = createUploadWasmTx(
*app, acc4, baseFee / 10, /* refundableFee */ 1200, resources);
auto smallSorobanLowFee =
createUploadWasmTx(*app, acc4, baseFee / 10,
DEFAULT_TEST_REFUNDABLE_FEE, resources);

TxSetFrame::TxPhases invalidPhases;
invalidPhases.resize(2);
Expand Down Expand Up @@ -4530,7 +4531,7 @@ TEST_CASE("do not flood too many soroban transactions",
curFeeOffset--;

auto tx = createUploadWasmTx(*app, source, txFee,
/* refundableFee */ 1200, resources);
DEFAULT_TEST_REFUNDABLE_FEE, resources);
REQUIRE(herder.recvTransaction(tx, false) ==
TransactionQueue::AddResult::ADD_STATUS_PENDING);
return tx;
Expand Down
2 changes: 1 addition & 1 deletion src/herder/test/TransactionQueueTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ TEST_CASE("Soroban TransactionQueue limits",
resources.readBytes = 2000;
resources.writeBytes = 1000;

int refundableFee = 1200;
int refundableFee = DEFAULT_TEST_REFUNDABLE_FEE;
int initialFee = 10'000'000;

auto resAdjusted = resources;
Expand Down
5 changes: 2 additions & 3 deletions src/herder/test/TxSetTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,8 @@ TEST_CASE("generalized tx set XDR conversion", "[txset]")
resources.instructions = 800'000;
resources.readBytes = 1000;
resources.writeBytes = 1000;
txs.emplace_back(createUploadWasmTx(*app, source, fee,
/* refundableFee */ 1200,
resources));
txs.emplace_back(createUploadWasmTx(
*app, source, fee, DEFAULT_TEST_REFUNDABLE_FEE, resources));
}
else
{
Expand Down
1 change: 1 addition & 0 deletions src/ledger/NetworkConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,7 @@ SorobanNetworkConfig::rustBridgeRentFeeConfiguration() const
CxxRentFeeConfiguration res{};
auto const& cfg = stateExpirationSettings();
res.fee_per_write_1kb = feeWrite1KB();
res.fee_per_write_entry = feeWriteLedgerEntry();
res.persistent_rent_rate_denominator = cfg.persistentRentRateDenominator;
res.temporary_rent_rate_denominator = cfg.tempRentRateDenominator;
return res;
Expand Down
2 changes: 1 addition & 1 deletion src/protocol-next/xdr
Submodule xdr updated 1 files
+0 −8 Stellar-contract-spec.x
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 = "dd3d39571e9fdae9af34f7f46243d0794169b411"
rev = "5dc7547a4b15028787d57a849a7684802d899fc7"

# 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 = "c2e1c21cf8d44db23a159090e3cbaab741860295"
rev = "f5c6c0f42b4094481b7f32ecac825ce27c7114e0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 5dc7547a4b15028787d57a849a7684802d899fc7 like the rest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to point to the "previous" host version (the comment has an explanation).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, sorry


[dependencies.soroban-test-wasms]
git = "https://github.com/stellar/rs-soroban-env"
rev = "dd3d39571e9fdae9af34f7f46243d0794169b411"
rev = "5dc7547a4b15028787d57a849a7684802d899fc7"

[dependencies.cargo-lock]
git = "https://github.com/rustsec/rustsec"
Expand Down
1 change: 1 addition & 0 deletions src/rust/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl From<CxxRentFeeConfiguration> for RentFeeConfiguration {
fn from(value: CxxRentFeeConfiguration) -> Self {
Self {
fee_per_write_1kb: value.fee_per_write_1kb,
fee_per_write_entry: value.fee_per_write_entry,
persistent_rent_rate_denominator: value.persistent_rent_rate_denominator,
temporary_rent_rate_denominator: value.temporary_rent_rate_denominator,
}
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 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411
soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=5dc7547a4b15028787d57a849a7684802d899fc7#5dc7547a4b15028787d57a849a7684802d899fc7
├── 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,14 +86,14 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39
│ ├── 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=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411
├── soroban-native-sdk-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=5dc7547a4b15028787d57a849a7684802d899fc7#5dc7547a4b15028787d57a849a7684802d899fc7
│ ├── 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=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411
│ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=2d2526f515a476b1e3df70233a4cf9232287977e#2d2526f515a476b1e3df70233a4cf9232287977e
├── soroban-env-common 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=5dc7547a4b15028787d57a849a7684802d899fc7#5dc7547a4b15028787d57a849a7684802d899fc7
│ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567#e2a9cbf72d94941de1bde6ba34a38e1f49328567
│ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70
│ │ ├── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
│ │ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a
Expand All @@ -109,9 +109,9 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39
│ │ └── 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=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411
│ ├── soroban-env-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=5dc7547a4b15028787d57a849a7684802d899fc7#5dc7547a4b15028787d57a849a7684802d899fc7
│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e
│ │ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=2d2526f515a476b1e3df70233a4cf9232287977e#2d2526f515a476b1e3df70233a4cf9232287977e
│ │ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567#e2a9cbf72d94941de1bde6ba34a38e1f49328567
│ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a
│ │ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d
│ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488
Expand Down
Loading