Skip to content

protocols/rpc: add MemoryBytes to SimulateTransactionResponse - #6025

Open
developerfred wants to merge 3 commits into
stellar:mainfrom
developerfred:rpc-simulate-memory-bytes
Open

developerfred wants to merge 3 commits into
stellar:mainfrom
developerfred:rpc-simulate-memory-bytes

Conversation

@developerfred

Copy link
Copy Markdown

What

Add MemoryBytes (json:"memoryBytes,omitempty") to protocols/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 from simulateTransaction. 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.

Expose the memory consumed by a simulated invocation as memoryBytes so
that Stellar RPC can return it from simulateTransaction.

Ref: stellar/stellar-rpc#477
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.

1 participant