circuit to upgrade the state root of the rollup with a decentralized mechanism.
this circuit will be linked to its smart contract function to assure fully and correct state root upgrade
Rationale
All accounts must be updated to their new account fields. Basically, two new fields would be added in each leaf: exitBalance = 0 and accumulatedHash = 0
Circuit should do the following:
take old root
proof existence for each account in the old root
process new root with new fields for each account
Notes
Circuit parameter would be nLevels and nAccounts
Optimize nAccounts in order to perform less smart contract calls to upgrade all accounts
Summary
circuit to upgrade the state root of the rollup with a decentralized mechanism. this circuit will be linked to its smart contract function to assure fully and correct state root upgrade
Rationale
All accounts must be updated to their new account fields. Basically, two new fields would be added in each leaf:
exitBalance = 0
andaccumulatedHash = 0
Circuit should do the following:Notes
nLevels
andnAccounts
nAccounts
in order to perform less smart contract calls to upgrade all accounts