diff --git a/Cargo.lock b/Cargo.lock
index ae9ab4a95..2c22a1d56 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -130,6 +130,21 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -154,6 +169,16 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "bs"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af0f70f64b53a02c58134d6e8b17a7d0cd7fd53ae20ec9a9aeb84a912594e2a1"
+dependencies = [
+ "bit-set",
+ "bit-vec",
+]
+
[[package]]
name = "bumpalo"
version = "3.13.0"
@@ -1336,6 +1361,7 @@ name = "soroban-env-host"
version = "0.0.17"
dependencies = [
"backtrace",
+ "bs",
"bytes-lit",
"curve25519-dalek",
"ed25519-dalek",
diff --git a/soroban-env-host/Cargo.toml b/soroban-env-host/Cargo.toml
index 29b4b704a..14f6834ec 100644
--- a/soroban-env-host/Cargo.toml
+++ b/soroban-env-host/Cargo.toml
@@ -36,6 +36,7 @@ k256 = {version = "0.13.1", features=["ecdsa", "arithmetic"]}
# is needed to build the host for wasm (a rare but supported config).
getrandom = { version = "0.2", features=["js"] }
sha3 = "0.10.8"
+bs = "0.1.0"
[dev-dependencies]
env_logger = "0.9.0"
diff --git a/soroban-env-host/src/auth.rs b/soroban-env-host/src/auth.rs
index 7de7b84d4..3a4953f50 100644
--- a/soroban-env-host/src/auth.rs
+++ b/soroban-env-host/src/auth.rs
@@ -702,7 +702,7 @@ impl AuthorizationManager {
// Use the respective push (like
// `push_create_contract_host_fn_frame`) functions instead to push
// the frame with the required info.
- Frame::HostFunction(_) => return Ok(()),
+ Frame::InitialInvokeHostFunctionOp(..) => return Ok(()),
Frame::Token(id, fn_name, ..) => (id.metered_clone(host.budget_ref())?, *fn_name),
#[cfg(any(test, feature = "testutils"))]
Frame::TestContract(tc) => (tc.id.clone(), tc.func),
diff --git a/soroban-env-host/src/cost_runner/cost_types/visit_object.rs b/soroban-env-host/src/cost_runner/cost_types/visit_object.rs
index cdf91e882..e7a809b58 100644
--- a/soroban-env-host/src/cost_runner/cost_types/visit_object.rs
+++ b/soroban-env-host/src/cost_runner/cost_types/visit_object.rs
@@ -1,6 +1,6 @@
use std::hint::black_box;
-use crate::{cost_runner::CostRunner, host_object::HostObject, xdr::ContractCostType, Object};
+use crate::{cost_runner::CostRunner, host_object::HostObjectBody, xdr::ContractCostType, Object};
pub struct VisitObjectRun;
@@ -17,7 +17,7 @@ impl CostRunner for VisitObjectRun {
host.unchecked_visit_val_obj(sample[iter as usize % sample.len()], |obj| match obj
.unwrap()
{
- HostObject::I64(i) => Ok(*i),
+ HostObjectBody::I64(i) => Ok(*i),
_ => panic!("unexpected type, check HCM"),
})
.unwrap(),
diff --git a/soroban-env-host/src/events/diagnostic.rs b/soroban-env-host/src/events/diagnostic.rs
index 032a839a4..126cef459 100644
--- a/soroban-env-host/src/events/diagnostic.rs
+++ b/soroban-env-host/src/events/diagnostic.rs
@@ -65,7 +65,7 @@ impl Host {
pub(crate) fn get_current_contract_id_unmetered(&self) -> Result