0xPolygonHermez/zkevm-contracts

Support for exit via `forceBatch`

qope opened this issue · 1 comments

qope commented

I am currently working on deploying a rollup with Polygon CDK in the most trustless manner possible. I am investigating whether users can exit (withdraw) without the permission of trusted sequencers.

It appears that the GlobalExitRoot in forceBatch always contains the latest value.

// Get globalExitRoot global exit root
bytes32 lastGlobalExitRoot = globalExitRootManager
.getLastGlobalExitRoot();
// Update forcedBatches mapping
lastForceBatch++;
forcedBatches[lastForceBatch] = keccak256(
abi.encodePacked(
keccak256(transactions),
lastGlobalExitRoot,
uint64(block.timestamp)
)
);

Therefore, it seems that users cannot change the GlobalExitRoot via forceBatch and thus cannot withdraw. Is my understanding correct?

qope commented

I overlooked that the globalExitRoot included in BatchData is read-only and that the rollupExitRoot will be updated during aggregation. It seems possible to exit with forceBatch, so I will close this issue.