HydraDX-node icon indicating copy to clipboard operation
HydraDX-node copied to clipboard

Split Oracle accumulators by Source

Open apopiak opened this issue 1 year ago • 0 comments

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.

apopiak avatar Sep 13 '23 11:09 apopiak