hubble-contracts
hubble-contracts copied to clipboard
Only consider fees of MAX_TXS_PER_COMMIT txns when prioritizing what to pack
See https://github.com/thehubbleproject/hubble-contracts/pull/621#discussion_r670416099
Problem
Currently, when determining the next token to pack, the value of all pending tokens in a queue is considered even though only 32 (MAX_TXS_PER_COMMIT
) of them will e packed into a commitment https://github.com/thehubbleproject/hubble-contracts/blob/master/ts/client/txPool.ts#L156-L158
Solution
- Only evaluate the 32 (
MAX_TXS_PER_COMMIT
) txns for a token with the highest fees when considering what to pack. - Consider updating
feeReceivers
to have a container class as well https://github.com/thehubbleproject/hubble-contracts/pull/621#discussion_r670400914
For "...feeReceivers
to have a container class", consider using https://github.com/thehubbleproject/hubble-contracts/blob/master/ts/client/tokenbase.ts