dymensionxyz / dymint

Sequencing Engine for Dymension RollApps
Other
97 stars 67 forks source link

Simplify sync target on aggregator #828

Closed danwt closed 4 months ago

danwt commented 4 months ago

For the aggregator

with https://github.com/dymensionxyz/dymint/pull/794

and maybe already on 0215717

https://github.com/dymensionxyz/dymint/pull/827/commits/43f02c5097f850e16725e51fba5f1d7dd04a7302#diff-0a427fe6ee00070e86bdb14930af6ae758cf682d702e12a2f386c56f20a5de2bR63-R68

the sync target is an abused variable which isn't concurrent on the produce/submitter/aggregator

We have the concept of accumulating the count of bytes of the batch so far, but it's not synchronized with the actual batch production so it is easy to miscount

We should simplify the submit loop drastically: we just take some heights on a channel from the block producer, and use these to work out when to submit a batch, based on time or max bytes

we can delete entirely the concept of the synctarget from the producer

in fact we should really have seperate sequencer/non sequencer objects and not multi purpose our fields

danwt commented 4 months ago

superseded by https://github.com/dymensionxyz/dymint/issues/850