FederatedSidechains icon indicating copy to clipboard operation
FederatedSidechains copied to clipboard

Block Processing from later blocks

Open bokobza opened this issue 7 years ago • 3 comments

The crosschaintransferStore keeps a record of all the deposits found on the counter chain. But it looks like it starts processing blocks from the genesis and builds some kind of database of where the interesting transactions are on the mainchain.

Since we know for a fact that there are absolutely 0 such transactions before block, say, 650000, why start from 0? Maybe we can start from more recent blocks?

Please ask @quantumagi for more details if necessary.

bokobza avatar Dec 13 '18 19:12 bokobza

I think we can do it like that: find timestamp of the genesis block on sidechain and parse mainchain starting from a block that is the closest to that timestamp. That way we will not parse blocks from the mainchain that were produced before sidechain was even launched.

@quantumagi @bokobza what do you think?

noescape00 avatar Dec 14 '18 09:12 noescape00

sounds good 👍

bokobza avatar Dec 14 '18 09:12 bokobza

Postponed. Half of the issue resolved in https://github.com/stratisproject/FederatedSidechains/pull/344 See the PR for more info.

noescape00 avatar Dec 20 '18 15:12 noescape00