Skip to content

Ignore state change entries which don't incur an actual diff#396

Merged
Shaptic merged 3 commits intomainfrom
ignore-diffless-changes
Apr 15, 2025
Merged

Ignore state change entries which don't incur an actual diff#396
Shaptic merged 3 commits intomainfrom
ignore-diffless-changes

Conversation

@Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Apr 7, 2025

What

Even though the key was touched (but left unchanged), it won't appear in the list of state changes. This is semantically fine, since no state changed.

Why

Closes #390 until stellar/rs-soroban-env#1448 is done. Simulation should still be able to succeed in these cases.

Known limitations

A bit hacky, but it's a temporary fix until the "proper" one is done in P23, where we'll include the key itself and allow null/null for before/after.

@Shaptic Shaptic requested review from a team, 2opremio and leighmcculloch April 7, 2025 05:10
@leighmcculloch
Copy link
Member

leighmcculloch commented Apr 7, 2025

A bit hacky, but it's a temporary fix until the "proper" one is done in P23, where we'll include the key itself and allow null/null for before/after.

I think the key here is that while this change will stop rpc from erroring, rpc's response won't be usable by clients to create the footprint required to submit the tx because the client won't know which ledger entry the (null,null) refers to, in the same way that rpc doesn't know.

Is that correct?

@Shaptic
Copy link
Contributor Author

Shaptic commented Apr 7, 2025

@leighmcculloch thankfully, no. This only affects the stateChanges field in simulateTransaction, which is purely there as an informative "here's what would change as part of this invocation." The transactionData which contains the footprint is completely unaffected.

@Shaptic Shaptic merged commit b61db27 into main Apr 15, 2025
19 checks passed
@Shaptic Shaptic deleted the ignore-diffless-changes branch April 15, 2025 15:56
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.

Simulation fails when contract removes persistent entry that doesn't exist

4 participants