Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Trace API plugin - Add support for action return values #9547

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

victorj8
Copy link
Contributor

@victorj8 victorj8 commented Oct 5, 2020

Change Description

The intent of this PR is to add support to the trace api plugin for a new field representing a value that may be returned by an action.

To accomplish this task 3 new structs were added:

action_trace_v1 : representing the new version of an action trace that now may contain a field representing the return value.

transaction_trace_v2: representing the new version for the transaction trace that supports action_trace_v1.

block_trace_v2: representing the new version for block trace that supports transaction_trace_v2.

The general idea is that, for example, a new version for action traces may now not require the creation of new structs for transaction trace and block trace, but only a modification to the actions type on the transaction trace struct (add a new possibility for the variant).

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@nksanthosh nksanthosh requested a review from b1bart October 5, 2020 15:11
@victorj8
Copy link
Contributor Author

victorj8 commented Oct 22, 2020

It appears unnecessary to include std::vector<action_trace_v0> in this as it will never be filled in. Is the choice to include it intentional such that the serialized format has a which value that lines up with the version?

That was not the intention, i added as a way to experiment how it would look like with different versions, but as you mention, currently it will not be filled in, so i just deleted it.

Is it worth considering taking a hard stance that "create_" code paths only make the latest types and can therefore be simplified with that assumption.

I modified to create the latest block_trace version .

@victorj8 victorj8 merged commit 585c354 into develop Oct 29, 2020
@heifner heifner deleted the feature/trace-plugin-action-return branch June 10, 2021 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants