Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reference type ID to MessageOut receipt #3409

Closed
ra0x3 opened this issue Nov 22, 2022 · 3 comments
Closed

Add reference type ID to MessageOut receipt #3409

ra0x3 opened this issue Nov 22, 2022 · 3 comments
Assignees
Labels
lib: std Standard library P: high Should be looked at if there are no critical issues left

Comments

@ra0x3
Copy link
Contributor

ra0x3 commented Nov 22, 2022

Issue

  • The Fuel Indexer allows users to index a MessageOut receipt
  • This MessageOut receipt is important -- one of the most important receipts -- because the messages are bridge messages
  • This receipt includes a hexadecimal payload field data that contains the byte payload sent in the receipt
  • Currently, we (using the indexer) have no way of deserializing that data payload into some type of struct/object
  • The LogData receipt works a bit similarly in that it also has a data payload that can be deserialized
  • However, the difference between LogData and MessageOut is that LogData includes a reference type ID -- that allows us to know which entity/object to deserialize the data payload to

Recommended Solution

  • We should add some reference type ID to the MessageOut receipt, so that users know which type the MessageOut data payload will deserialize to
  • @adlerjohn Suggested merely appending the 64-bit reference type ID to the beginning of the MessageOut data payload in the stdlib

CC @nfurfaro because this might involve stdlib
CC @mohammadfawaz because this is Sway-related
CC @deekerno

@ra0x3 ra0x3 added lib: std Standard library P: high Should be looked at if there are no critical issues left labels Nov 22, 2022
@ra0x3
Copy link
Contributor Author

ra0x3 commented Nov 22, 2022

@ra0x3
Copy link
Contributor Author

ra0x3 commented Dec 8, 2022

@mohammadfawaz Just following up on this :)

@mohammadfawaz mohammadfawaz self-assigned this Dec 8, 2022
mohammadfawaz added a commit to FuelLabs/fuels-rs that referenced this issue Dec 12, 2022
This is needed for FuelLabs/sway#3409.
Basically, we want to be able to decode the data sent via `smo`, just
like logs, so messages need to store information in the JSON ABI.

Doesn't look like this impacts anything at the moment as everything
compiles fine.

Spec change: FuelLabs/fuel-specs#444
Compiler change: FuelLabs/sway#3564 that needs
this (currently using a local copy of `fuels-rs`)
@mohammadfawaz
Copy link
Contributor

I believe this can be closed now after #3564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib: std Standard library P: high Should be looked at if there are no critical issues left
Projects
Status: Done
Development

No branches or pull requests

2 participants