thehubbleproject / hubble-contracts

Hubble optimistic rollup
https://thehubbleproject.github.io/docs/
MIT License
133 stars 28 forks source link

Only consider fees of MAX_TXS_PER_COMMIT txns when prioritizing what to pack #628

Open jacque006 opened 3 years ago

jacque006 commented 3 years ago

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

jacque006 commented 3 years ago

For "...feeReceivers to have a container class", consider using https://github.com/thehubbleproject/hubble-contracts/blob/master/ts/client/tokenbase.ts