Floats are, in general, bad practice in a blockchain environment, as they are not deterministic across different architectures. In essense our offchain-worker could handle this, but when it comes to verifying merkle-root hashes, we might have issues; the client might be unlucky and get a different leaf hash compared to the offchain-worker.
Options:
Use fixed point numbers. This might be a bit hard to implement, depending on the client and its programming language.
The orders are stored as a json-string, so instead of calculating the Merkle hashes over the actual data, we can always use strings in the hashing operations. A bit hacky, but maybe easier to implement for certain clients.
Floats are, in general, bad practice in a blockchain environment, as they are not deterministic across different architectures. In essense our offchain-worker could handle this, but when it comes to verifying merkle-root hashes, we might have issues; the client might be unlucky and get a different leaf hash compared to the offchain-worker.
Options: