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

`MessageOut` receipt do not match specs or common bytes length

Open luizstacio opened this issue 1 year ago • 0 comments

Version: fuel-core: v0.18.3

When a contract outputs a message, it creates a receipt that should match the current specs; https://specs.fuel.network/master/abi/receipts.html#messageout-receipt

The current bytes look like this;

// Type (8)
0, 0, 0, 0, 0, 0, 0, 10,
// Sender (32)
121, 108, 232, 48, 254, 183, 45, 178, 92, 254, 191,
36, 78, 227, 74, 129, 232, 160, 62, 188, 91, 62, 112, 16, 197, 212, 244, 74,
4, 245, 121, 59,
// Recipient (32)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 200, 211, 38, 144,
204, 145, 212, 195, 157, 157, 58, 188, 189, 22, 152, 159, 135, 87, 7,
// Amount (8)
0, 0, 0, 0, 0, 0, 0, 0,
// Nonce (32)
135, 203, 218, 102, 65, 49, 142, 139, 38, 239, 229, 156, 217,
68, 163, 211, 24, 172, 31, 227, 68, 99, 27, 104, 157, 201, 215, 32, 160, 82,
2, 11,
// DataLength (8)  (This should be the length of the data but is returning the wrong size) <-----
0, 0, 0, 0, 0, 0, 0, 104,
// Digest (32)
131, 27, 27, 49, 15, 91, 218, 138, 171, 46,
201, 165, 84, 127, 68, 63, 241, 10, 47, 69, 101, 192, 147, 41, 62, 212, 223,
202, 129, 74, 143, 24,
// DataLength (16) (This is not on specs and also has a wrong length of 16 bytes) <-----
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100,
// Data (The message sent from the contract only have 100 bytes but because of the issue on the fuel-core this current length returned is 104)
83, 239, 20, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 68, 205, 221,
182, 169, 0, 250, 43, 88, 93, 210, 153, 224, 61, 18, 250, 66, 147, 188, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 43, 13, 54, 250, 205, 97, 183, 28, 192, 90, 184, 243,
210, 53, 94, 195, 99, 28, 13, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 199, 35, 4, 137, 232, 0, 0, 0, 0, 0, 0,

luizstacio avatar Jul 07 '23 17:07 luizstacio