fuel-vm icon indicating copy to clipboard operation
fuel-vm copied to clipboard

Prototype: Add `DataCoin` to inputs and outputs

Open MitchTurner opened this issue 9 months ago • 3 comments

Attempt at understanding the work required to do https://github.com/FuelLabs/fuel-core/issues/2821

Checklist

  • [ ] Breaking changes are clearly marked as such in the PR description and changelog
  • [ ] New behavior is reflected in tests
  • [ ] If performance characteristic of an instruction change, update gas costs as well or make a follow-up PR for that
  • [ ] The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • [ ] I have reviewed the code myself
  • [ ] I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

MitchTurner avatar Mar 18 '25 22:03 MitchTurner

@xgreenx @Dentosal

IS this a viable approach: creating a new output/input type for the DataCoin? Or should we just add an Optionof data to Coin?

Also, Output isn't Clone so I just attached a hash of the data, but Idk how we include the data then. On the Tx? and then it can be indexed somewhere.

I'm guessing you guys are more familiar with the vm and might have some ideas.

MitchTurner avatar Mar 20 '25 16:03 MitchTurner

IS this a viable approach: creating a new output/input type for the DataCoin? Or should we just add an Optionof data to Coin?

Also, Output isn't Clone so I just attached a hash of the data, but Idk how we include the data then. On the Tx? and then it can be indexed somewhere.

I'm guessing you guys are more familiar with the vm and might have some ideas.

We could probably make Output Clone it that helps? The whole input/output code is rather messy so I'm not sure what's the best approach code-wise. DataCoin approach should be viable as well. I don't actually understand what the data output is exactly for, though, so I'm not sure what's the best approach here.

Dentosal avatar Mar 20 '25 16:03 Dentosal

@Dentosal maybe we can set up a call to knowledge share some context on how we store outputs and how they differ from inputs. I agree the code is a bit of a mess lol.

MitchTurner avatar Mar 20 '25 23:03 MitchTurner