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

CertVerifier Deployer #1302

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

CertVerifier Deployer #1302

wants to merge 4 commits into from

Conversation

0x0aa0
Copy link
Contributor

@0x0aa0 0x0aa0 commented Feb 21, 2025

Adds a script to deploy a CertVerifier with specified thresholds and required quorums based on a network config

@0x0aa0 0x0aa0 requested a review from ethenotethan February 21, 2025 15:50
Comment on lines 3 to 4
This script can be used to deploy an EigenDACertVerifier contract with specified security thresholds and quorum numbers required

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's specify that deployments can only be done on an Ethereum network and this isn't supported for L3 rollups

Comment on lines +40 to +44
bytes memory raw = stdJson.parseRaw(data, ".eigenDAServiceManager");
eigenDAServiceManager = abi.decode(raw, (address));

raw = stdJson.parseRaw(data, ".eigenDAThresholdRegistry");
eigenDAThresholdRegistry = abi.decode(raw, (address));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not used vm.envAddress("eigenDAServiceManager") and reference env as a .env instead of json? iiuc it'd be a bit of a nightmare though when reading structured values (i.e, defaultSecurityThresholds)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - would it maybe be cleaner to define some struct DeploymentParams and decode the json input into that? https://book.getfoundry.sh/cheatcodes/parse-json#decoding-json-objects-into-solidity-structs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya json is a bit more straightforward to decode with the forge scripts


console.log("Deployed new EigenDACertVerifier at address: ", eigenDACertVerifier);

string memory outputPath = "script/deploy/certverifier/output/certverifier_deployment_data.json";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - wouldn't this override an existing deployment's metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya I could add a input to pass in output file name

Comment on lines +17 to +22
"defaultSecurityThresholds": {
"0_confirmationThreshold": 55,
"1_adversaryThreshold": 33
},

"quorumNumbersRequired": "0x0001"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I'm a customer and I wanna leverage custom quourm/threshold, do I just update these fields here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup would just need to update quorumNumbersRequired

@@ -0,0 +1,42 @@
## EigenDA Cert Verfier Deployer

This script can be used to deploy an EigenDACertVerifier contract with specified security thresholds and quorum numbers required
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
This script can be used to deploy an EigenDACertVerifier contract with specified security thresholds and quorum numbers required
This script can be used to deploy an EigenDACertVerifier contract with custom security thresholds and quorum numbers

Comment on lines +38 to +42
```json
{
"eigenDACertVerifier": "0x..."
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is there any utility in capturing deployment inputs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you think its useful I can add it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants