Skip to content

Bump XDR and env to v23.0.0-rc.1.1#1467

Merged
dmkozh merged 9 commits into
stellar:mainfrom
dmkozh:rc1_deps
May 20, 2025
Merged

Bump XDR and env to v23.0.0-rc.1.1#1467
dmkozh merged 9 commits into
stellar:mainfrom
dmkozh:rc1_deps

Conversation

@dmkozh
Copy link
Copy Markdown
Contributor

@dmkozh dmkozh commented May 17, 2025

What

Bump XDR and env to v23.0.0-rc.1.1

This is a minimum necessary SDK change to support protocol 23.

Why

Preparing for 23.0.0-rc.1 release

Known limitations

N/A

This is a minimum necessary SDK change to support protocol 23.
@dmkozh dmkozh marked this pull request as draft May 17, 2025 00:56
Comment thread soroban-spec-rust/src/lib.rs
Comment thread soroban-sdk/src/env.rs Outdated
Comment thread soroban-sdk/src/num.rs Outdated
github-merge-queue Bot pushed a commit to stellar/rs-soroban-env that referenced this pull request May 19, 2025
### What
Rename the host comparison method from check_same_env to is_same,
changing it to return a boolean instead of a Result.

  ### Why
The new name better reflects the method's purpose of being used by the
SDK to compare two Hosts and determine if they in fact are the same
underlying host implementation. The check function returns a result with
the host assuming that there is in fact an error, whilst the is function
returns a bool, merely providing information to the SDK so that the SDK
can then decide in the context of its use whether there is an error or a
change in behaviour is required.

Close #1554 

Related:
-
stellar/rs-soroban-sdk#1467 (comment)
@dmkozh dmkozh changed the title Bump XDR and env to v23.0.0-rc.1. Bump XDR and env to v23.0.0-rc.1.1 May 19, 2025
@dmkozh dmkozh marked this pull request as ready for review May 19, 2025 22:54
Comment thread soroban-sdk/src/num.rs
@dmkozh dmkozh added this pull request to the merge queue May 19, 2025
Merged via the queue into stellar:main with commit 274e276 May 20, 2025
17 checks passed
@dmkozh dmkozh deleted the rc1_deps branch May 20, 2025 00:13
github-merge-queue Bot pushed a commit that referenced this pull request Jun 23, 2025
### What

Add a `testutils` feature to `soroban-ledger-snapshot`, and use it to
gate the functionality in ledger snapshots that uses the
`soroban-env-host`'s `testutils` features.

### Why

In #1467 the
`soroban-ledger-snapshot` crate dependency on `soroban-env-host` was
changed to include an always-enabled dependency on the `testutils`
feature. This appears to have been done because the function
`get_stored_entries` of the `Host` was changed from being always
available, to only available in `testutils` mode. The
`soroban-ledger-snapshot` crate uses the `get_stored_entries` function.

A side-effect of of always pulling in the `soroban-env-host` is that the
`soroban-ledger-snapshot` crate became incompatible with any project
that also depends on the `soroban-sdk` without its `testutil` feature
enabled. This is because the `soroban_env_host::EnvBase` trait type,
which is implemented by the `soroban-sdk` crate, has functions that are
required when the `testutil` feature is enabled.

To resolve the above challenges with only changes to this repository the
most straight-forward thing to do is to move the functionality in
`soroban-ledger-snapshot` that now needs `testutils` in
`soroban-env-host` behind a `testutils` feature as well, which
`soroban-sdk` enables when it uses `soroban-ledger-snapshot`.

### Known Limitations

Features on traits, like `EnvBase`, inherently create situations where
dependencies can get stuck in situations where they are incompatible
because another dep might be dependent on the trait in the opposite
state. We should probably revisit `EnvBase`'s liberal use of features,
breaking it up into separate traits. Rust features should always be,
where possible, additively compatible. I've opened the following issue
for us to explore that sometime:
- stellar/rs-soroban-env#1570

We may also want to revisit whether some simple getters like
`get_stored_entries` truly need to be gated behind a testutils flag.
Features in general come at a cost in maintenance and rigidity.
Typically features in Rust projects are used to reduce dependencies, but
in `soroban-env-host` we are using it to limit features in different use
cases.

After #1467 and the change
in this PR, some of the functionality in `soroban-ledger-snapshot` crate
is unusable with the `Host`, unless the `Host` is being used in
`testutils` mode. Today the only uses of the library that use that
functionality is when the `soroban-sdk` is also being used with
`testutils` enabled, but it is feasible that we may want to use the
functionality in situations where it doesn't make sense to run the
`Host` in `testutils` mode. This would probably mean changing the
function in `soroban-env-host` that became testutils only, to be
available without `testutils` again. We don't need it today, so I'm not
proposing it today.

cc @stellar/devx @stellar/contract-committers @fnando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants