Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decentralized prover #97

Merged
merged 40 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
95d8750
Move tree update in a separate function
AllFi Nov 24, 2023
ffa96ec
Add grace period
AllFi Nov 24, 2023
406c2bf
Refactor code, add tests
AllFi Nov 27, 2023
1da8886
adds tests for dd
r0wdy1 Nov 30, 2023
effa3ee
Fix message event, add comments
AllFi Nov 30, 2023
799b765
adds tests for priority queue
r0wdy1 Dec 1, 2023
cccd9e7
Add tests, minor fixes
AllFi Dec 11, 2023
eeb3821
Add AllowListOperatorManager tests
AllFi Dec 12, 2023
91053a2
Minor refactoring
AllFi Dec 13, 2023
7168553
Minor fixes
AllFi Dec 13, 2023
f823aec
Refactor PriorityQueue
AllFi Dec 13, 2023
c32eb0b
Fix formatting
AllFi Jan 4, 2024
266c118
Fix formatting
AllFi Jan 4, 2024
ec8b5c1
Fix formatting
AllFi Jan 4, 2024
5d78b89
Rename transact, add calldata version
AllFi Jan 5, 2024
93c29bf
Add commitment to RootUpdated event
AllFi Jan 11, 2024
c397b69
Return gracePeriodEnd from pendingCommitment
AllFi Jan 12, 2024
20382b7
Add memo message size
AllFi Jan 16, 2024
b8356d3
Add extra data to tests
AllFi Jan 17, 2024
8250dce
Support new message prefix
AllFi Jan 17, 2024
6fe228e
Remove forced exit related code
AllFi Jan 24, 2024
61b2fbd
Update src/zkbob/utils/PriorityQueue.sol
AllFi Jan 31, 2024
ecc926b
Refactor AllowListOperatorManager
AllFi Jan 31, 2024
6d16f95
Rename PriorityQueue, add copyright, uint32 timestamp
AllFi Feb 1, 2024
1182878
Remove minTreeUpdateFeeIsSet modifier
AllFi Feb 1, 2024
8d19384
Pack fee reciever and allowed in a single struct
AllFi Feb 1, 2024
d5648f7
Remove lastTreeUpdateTimestamp
AllFi Feb 2, 2024
3d39ff4
Add gaps, fix testNativeWithdrawal
AllFi Feb 2, 2024
95ef57e
Fix formatting
AllFi Feb 2, 2024
d640c76
Update ZkBobPool.s.sol and Local.s.sol scripts
AllFi Feb 22, 2024
e3da183
Add script to deploy new operator, modify upgrade script
AllFi Feb 22, 2024
0333691
Minor fixes
AllFi Feb 26, 2024
ccc7c73
Add privileged prover in calldata
AllFi Mar 26, 2024
a41c6aa
Update scripts
AllFi Mar 26, 2024
5ec30b8
Add decentralization upgrade script
AllFi Jun 3, 2024
22644a7
Modify migration script
AllFi Jun 5, 2024
8f37f9f
Update scripts
AllFi Jul 4, 2024
b864c8e
Minor fixes
AllFi Aug 19, 2024
78eb1bd
Fix format
AllFi Aug 19, 2024
8428fa2
Fix format
AllFi Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions script/scripts/DeployZkBobPoolModules.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ contract DeployZkBobPoolModules is Script, Test {
vm.startBroadcast();

ZkBobPoolUSDC impl = new ZkBobPoolUSDC(
pool.pool_id(), pool.token(), pool.transfer_verifier(), pool.tree_verifier(),
pool.batch_deposit_verifier(), address(pool.direct_deposit_queue())
pool.pool_id(),
pool.token(),
pool.transfer_verifier(),
pool.tree_verifier(),
pool.batch_deposit_verifier(),
address(pool.direct_deposit_queue())
);
Migrator mig = new Migrator();
ZkBobAccounting acc = new ZkBobAccounting(address(pool), 1_000_000_000);
Expand Down
7 changes: 1 addition & 6 deletions script/scripts/Local.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ contract DeployLocal is Script {
EIP1967Proxy queueProxy = new EIP1967Proxy(tx.origin, mockImpl, "");

ZkBobPoolBOB poolImpl = new ZkBobPoolBOB(
zkBobPoolId,
address(bob),
transferVerifier,
treeVerifier,
batchDepositVerifier,
address(queueProxy)
zkBobPoolId, address(bob), transferVerifier, treeVerifier, batchDepositVerifier, address(queueProxy)
);
{
bytes memory initData = abi.encodeWithSelector(ZkBobPool.initialize.selector, zkBobInitialRoot);
Expand Down
28 changes: 16 additions & 12 deletions script/scripts/ZkBobPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,31 @@ contract DeployZkBobPool is Script {

if (zkBobPoolType == PoolType.ETH) {
vars.poolImpl = new ZkBobPoolETH(
zkBobPoolId, zkBobToken,
transferVerifier, treeVerifier, batchDepositVerifier,
address(vars.queueProxy), permit2
zkBobPoolId,
zkBobToken,
transferVerifier,
treeVerifier,
batchDepositVerifier,
address(vars.queueProxy),
permit2
);
} else if (zkBobPoolType == PoolType.BOB) {
vars.poolImpl = new ZkBobPoolBOB(
zkBobPoolId, zkBobToken,
transferVerifier, treeVerifier, batchDepositVerifier,
address(vars.queueProxy)
zkBobPoolId, zkBobToken, transferVerifier, treeVerifier, batchDepositVerifier, address(vars.queueProxy)
);
} else if (zkBobPoolType == PoolType.USDC) {
vars.poolImpl = new ZkBobPoolUSDC(
zkBobPoolId, zkBobToken,
transferVerifier, treeVerifier, batchDepositVerifier,
address(vars.queueProxy)
zkBobPoolId, zkBobToken, transferVerifier, treeVerifier, batchDepositVerifier, address(vars.queueProxy)
);
} else if (zkBobPoolType == PoolType.ERC20) {
vars.poolImpl = new ZkBobPoolERC20(
zkBobPoolId, zkBobToken,
transferVerifier, treeVerifier, batchDepositVerifier,
address(vars.queueProxy), permit2,
zkBobPoolId,
zkBobToken,
transferVerifier,
treeVerifier,
batchDepositVerifier,
address(vars.queueProxy),
permit2,
vars.denominator
);
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/interfaces/IZkBobAccounting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ interface IZkBobAccounting {
enum TxType {
Common,
DirectDeposit,
AppendDirectDeposits,
ForcedExit
AppendDirectDeposits
}

struct Limits {
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/IZkBobDirectDeposits.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface IZkBobDirectDeposits {
Pending, // requested deposit was submitted and is pending in the queue
Completed, // requested deposit was successfully processed
Refunded // requested deposit was refunded to the fallback receiver

}

struct DirectDeposit {
Expand Down
Loading
Loading