Prototype: Add `DataCoin` to inputs and outputs
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]
- [ ] Rust SDK
- [ ] Sway compiler
- [ ] Platform documentation (for out-of-organization contributors, the person merging the PR will do this)
- [ ] Someone else?
@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.
IS this a viable approach: creating a new output/input type for the
DataCoin? Or should we just add anOptionof data toCoin?Also,
Outputisn'tCloneso 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
vmand 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 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.