Repository navigation
protocols/rpc: add MemoryBytes to SimulateTransactionResponse - #6025
Open
developerfred wants to merge 3 commits into
Open
developerfred wants to merge 3 commits into
developerfred wants to merge 3 commits into
Conversation
Expose the memory consumed by a simulated invocation as memoryBytes so that Stellar RPC can return it from simulateTransaction. Ref: stellar/stellar-rpc#477
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
MemoryBytes(json:"memoryBytes,omitempty") toprotocols/rpc.SimulateTransactionResponse, with a unit test and a CHANGELOG entry.Why
Stellar RPC already receives the simulated memory consumption from the preflight layer (
memory_bytes), but the response type has no field to carry it, so it can't be returned fromsimulateTransaction. This is the SDK half of stellar/stellar-rpc#477; a follow-up in stellar-rpc plumbs the value through once this is released. The name follows the camelCase convention of the other response fields (e.g.minResourceFee,latestLedger).Known limitations
Additive and omitted when zero, so existing clients are unaffected. stellar-rpc needs a release containing this field before it can populate it.