movementlabsxyz / movement

The Movement Network is a Move-based L2 on Ethereum.
Apache License 2.0
71 stars 61 forks source link

Update `atomic_bridge.move` to use blockheight as timelock not timestamp #213

Closed 0xmovses closed 2 months ago

0xmovses commented 3 months ago

As discussed with @cde8 the timelock sync between chains occurs at the blockheight level, not the timestamp level.

Currently the atomic_bridge.move(counterparty) module uses timestamp, whereas the eth (initiator) uses blockheight. This was merged optimistically as an issue to fix later.

You can see us setting the timestamp in motion here https://github.com/movementlabsxyz/movement/pull/205/files#diff-a56b20379dbef0e9742fd9a9e7fe5512e645e339176a27bbbe4774bfa0aabe5a

I initially tried to use blockheight in the tests but this broke the tests wouldn't run withe compiler reporting some errors within aptos-framework code. Now that we have the upstream sync, this issue may be resolved.

0xmovses commented 2 months ago

Done and merged into https://github.com/movementlabsxyz/movement/pull/215