You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why ordering of inputs and outputs can' be deterministic #2
I noticed that the GenesisID changes according to the order of data added when issuing a contract.
After investigating, I noticed that the immutable and destructible fields, used in Genesis CommitmentId, are of type SmallVec., i.e, we have no ordering guarantees.
We could use the TinyOrdMap type, for example, to guarantee that regardless of the order of the entries, we will produce the same GenesisID, which consequently makes the same ContractID.
To reproduce the error, use the two YAMLs I added below. In them, I reversed the order of the circulating fields in them.
Yes, that is an intendent behaviour. We have the same in RGB all previous versions, as well as in bitcoin - or any other transactions.
Ordering of intputs and outputs is a part of non-deterministic Turing machine, as well as the graph of transactions.
If it were made in a deterministic order, we for instance would never have Opret scheme.
There is no point of having inputs or outputs in any transaction-based distributed system to be a map and not a vec, where the order is set not by an algorithm but by a willing agent external to the system
Activity
dr-orlovsky commentedon Jan 10, 2025
Yes, that is an intendent behaviour. We have the same in RGB all previous versions, as well as in bitcoin - or any other transactions.
Ordering of intputs and outputs is a part of non-deterministic Turing machine, as well as the graph of transactions.
If it were made in a deterministic order, we for instance would never have Opret scheme.
There is no point of having inputs or outputs in any transaction-based distributed system to be a map and not a vec, where the order is set not by an algorithm but by a willing agent external to the system
[-]Genesis fields need be deterministic[/-][+]Why ordering of inputs and outputs can' be deterministic[/+]