Skip to content

Commit

Permalink
Merge branch 'main' into observe-more-things
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon authored Nov 17, 2023
2 parents 7cf74ff + 014004b commit 07e4c5a
Show file tree
Hide file tree
Showing 34 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion soroban-bench-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion soroban-builtin-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
version.workspace = true
readme = "../README.md"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[build_dependencies]
crate-git-revision = "0.0.6"
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-common/tests/no_std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "test_no_std"
version.workspace = true
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
doctest = false
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
version.workspace = true
readme = "../README.md"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[dependencies]
soroban-env-common = { workspace = true, features = [] }
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
version.workspace = true
readme = "../README.md"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"
build = "build.rs"

[dependencies]
Expand Down
8 changes: 4 additions & 4 deletions soroban-env-host/src/budget/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use crate::{
/// exccessive stack allocation, which could cause an unrecoverable `SIGABRT`,
/// and exccessive heap memory allocation.
pub const DEFAULT_XDR_RW_LIMITS: Limits = Limits {
/// recursion limit for reading and writing XDR structures.
// recursion limit for reading and writing XDR structures.
depth: 500,
/// maximum byte length for a data structure during serialization and
/// deserialization to and from the XDR format. The limit of 16MiB
/// corresponds to the overlay maximum message size.
// maximum byte length for a data structure during serialization and
// deserialization to and from the XDR format. The limit of 16MiB
// corresponds to the overlay maximum message size.
len: 0x1000000,
};

Expand Down
3 changes: 1 addition & 2 deletions soroban-env-host/src/e2e_invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ pub fn get_ledger_changes<T: SnapshotSource>(
init_storage_snapshot: &T,
init_ttl_entries: TtlEntryMap,
) -> Result<Vec<LedgerEntryChange>, HostError> {
let mut changes = vec![];
// Skip allocation metering for this for the sake of simplicity - the
// bounding factor here is XDR decoding which is metered.
changes.reserve(storage.map.len());
let mut changes = Vec::with_capacity(storage.map.len());

let footprint_map = &storage.footprint.0;
// We return any invariant errors here as internal errors, as they would
Expand Down
3 changes: 1 addition & 2 deletions soroban-env-host/src/events/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,13 @@ impl InternalEventsBuffer {
/// Converts the internal events into their external representation. This should only be called
/// either when the host is finished (via `try_finish`), or when an error occurs.
pub fn externalize(&self, host: &Host) -> Result<Events, HostError> {
let mut vec: Vec<HostEvent> = vec![];
// This line is intentionally unmetered. We want to separate out charging
// the main budget for `Contract` events (with "observable" costs) from
// charging the debug budget for `Diagnostic` events (with "non-observable"
// costs). Both event types are stored in the same input vector so we must
// not do a bulk charge based on its length, but rather walk through it
// charging to one budget or the other on an event-by-event basis.
vec.reserve(self.vec.len());
let mut vec = Vec::with_capacity(self.vec.len());

let mut metered_external_event_push =
|event: xdr::ContractEvent, status: &EventError| -> Result<(), HostError> {
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-host/src/test/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl SnapshotSource for MockSnapshotSource {
}

impl Host {
pub(crate) const TEST_PRNG_SEED: &[u8; 32] = b"12345678901234567890123456789012";
pub(crate) const TEST_PRNG_SEED: &'static [u8; 32] = b"12345678901234567890123456789012";

pub(crate) fn test_host() -> Self {
let host = Host::default();
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion soroban-synth-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version.workspace = true
description = "crate full of precompiled test WASM binaries for soroban -- for use in other tests, do not publish"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/add_f32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/add_i32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/alloc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/complex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/contract_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/err/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/fannkuch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/fib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/hostile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/linear_memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/update/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion soroban-test-wasms/wasm-workspace/vec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.73"
rust-version = "1.74"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down

0 comments on commit 07e4c5a

Please sign in to comment.