Skip to content

Pass encoded Soroban changes to C++ in strict footprint order. - #5421

Open
dmkozh wants to merge 1 commit into
stellar:masterfrom
dmkozh:rw_keys_opt
Open

Pass encoded Soroban changes to C++ in strict footprint order.#5421
dmkozh wants to merge 1 commit into
stellar:masterfrom
dmkozh:rw_keys_opt

Conversation

@dmkozh

@dmkozh dmkozh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

This allows us to get rid of a hash map used for marking non-deleted RW keys, which saves us a few ms of apply time.

This change naturally comes from the refactoring done in p28 which caused host to operate on data in footprint order. Thus this is a non-breaking change that uses p28 host as is.

Also includes a passing-by copy->move optimization.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI balanced review requested due to automatic review settings August 19, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Optimizes protocol-28 Soroban change application by preserving footprint order and removing hash-map bookkeeping.

Changes:

  • Emits RW changes in footprint order, followed by TTL updates.
  • Adds ordered C++ application logic while retaining legacy behavior.
  • Moves parallel-apply entries instead of copying them.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/transactions/ParallelApplyUtils.cpp Moves entries into the thread map.
src/transactions/InvokeHostFunctionOpFrame.cpp Applies ordered Soroban ledger changes.
src/rust/src/soroban_proto_any.rs Encodes host effects in footprint order.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/rust/src/soroban_proto_any.rs Outdated
This allows us to get rid of a hash map used for marking non-deleted RW keys, which saves us a few ms of apply time.

This change naturally comes from the refactoring done in p28 which caused host to operate on data in footprint order. Thus this is a non-breaking change that uses p28 host as is.

Also includes a passing-by copy->move optimization.
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.

2 participants