HydraDX-node
HydraDX-node copied to clipboard
Split Oracle accumulators by Source
Detailed Description
Currently pallet-ema-oracle
accumulates all entries into one BTreeMap. This allows for predictable weight of on_finalize
, but limits the number of unique combinations of (Source, (AssetId, AssetId))
that can be placed within one block (and thus the number of parallel trades in independent pools).
It would be possible and probably desirable to associate each Source with its own accumulator and ensure predictable on_finalize
weight by limiting the number of sources.