-
Notifications
You must be signed in to change notification settings - Fork 4
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
new sepolia deployment #166
Conversation
WalkthroughThe pull request includes significant updates to various JSON files related to smart contract deployments on the Sepolia network. Key changes involve modifications to contract addresses, transaction hashes, and various metadata fields across multiple mock contracts. Several mock contracts, including Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
packages/evm/deployments/sepolia/MockComputeProvider.json (1)
Line range hint
1-64
: Verify contract interface implementation.The contract implements
IComputeProvider
with avalidate
function that returns anIDecryptionVerifier
. The ABI and bytecode look consistent with a mock implementation.Consider adding deployment verification tests to ensure:
- The contract correctly implements the
IComputeProvider
interface- The
validate
function correctly handles the mock decryption verifier address- The contract integrates properly with other deployed mock contracts
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (6)
packages/evm/deployments/sepolia/MockComputeProvider.json
(2 hunks)packages/evm/deployments/sepolia/MockDecryptionVerifier.json
(2 hunks)packages/evm/deployments/sepolia/MockE3Program.json
(3 hunks)packages/evm/deployments/sepolia/MockInputValidator.json
(2 hunks)packages/evm/deployments/sepolia/NaiveRegistryFilter.json
(2 hunks)packages/evm/deployments/sepolia/solcInputs/3d9e1a948fbfdecab1738e926b737452.json
(0 hunks)
💤 Files with no reviewable changes (1)
- packages/evm/deployments/sepolia/solcInputs/3d9e1a948fbfdecab1738e926b737452.json
🔇 Additional comments (17)
packages/evm/deployments/sepolia/MockDecryptionVerifier.json (3)
52-53
: LGTM: Deployment configuration is appropriate
The deployment configuration uses:
- Recent Solidity version (0.8.27)
- Appropriate optimizer settings (enabled, 800 runs)
- Specific EVM version (Paris)
Line range hint 3-33
: Security: Mock implementation should not be used in production
The contract implements a permissive mock verification that returns true
for any non-empty input. Given that the original MockDecryptionVerifier.sol
has been removed, please confirm:
- This deployment is strictly for testing purposes on Sepolia
- There's a plan to replace this with a proper implementation
#!/bin/bash
# Check if there are any production deployment files using this mock
fd -e json -t f "MockDecryptionVerifier.json" | grep -v "sepolia\|localhost\|hardhat"
2-2
: Verify contract dependencies are updated with the new address
The contract has been redeployed with a new address and deployer. Ensure that all dependent contracts and configurations are updated to reference the new address 0x1C768fB51e9D33EE1eE9E725cE9241f73a0A2047
.
Also applies to: 37-38
✅ Verification successful
Let me analyze the deployment scripts and contract references to ensure we have a complete picture of the dependencies.
Let me analyze how the MockDecryptionVerifier address is used in the tasks and deployment scripts to ensure we have the complete context about its dependencies.
No manual verification needed - address updates handled automatically
The deployment script (mocks.ts
) automatically configures the new MockDecryptionVerifier address in the Enclave contract using setDecryptionVerifier()
. The address is also dynamically loaded in tasks/enclave.ts
using the deployment artifacts. No hardcoded addresses were found that need updating.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any hardcoded references to the old contract address that might need updating
rg -i "0x81C00a1FD136a49FBBD8e692817b97ecB8BC2Ca8"
# Search for configuration files that might need updating
fd -e json -e yaml -e toml | xargs rg -l "MockDecryptionVerifier"
Length of output: 422
Script:
#!/bin/bash
# Search for any references to MockDecryptionVerifier in the codebase
rg -l "MockDecryptionVerifier"
# Search for any contract imports or references that might need the address
ast-grep --pattern 'import "$_" from "$_"' | rg -i "mock.*decrypt"
# Look for address configurations in deployment scripts
rg -l "MockDecryptionVerifier.*address"
Length of output: 523
Script:
#!/bin/bash
# Check the content of tasks/enclave.ts to see how the address is used
rg -A 5 -B 5 "MockDecryptionVerifier.*address" packages/evm/tasks/enclave.ts
# Check the deployment script to understand the deployment configuration
cat packages/evm/deploy/mocks.ts
# Check if there are any direct address references in test files
rg "0x[a-fA-F0-9]{40}" packages/evm/test/Enclave.spec.ts
Length of output: 2168
packages/evm/deployments/sepolia/MockInputValidator.json (4)
Line range hint 3-33
: LGTM: Mock implementation maintains expected behavior
The contract interface and mock implementation are appropriate for testing purposes, with a deterministic validation logic based on input length.
Line range hint 52-62
: LGTM: Compiler configuration is production-ready
The contract uses appropriate compiler settings:
- Optimizer enabled (800 runs)
- IR-based compilation
- Recent Solidity version (0.8.27)
35-46
: Verify related contract deployments
The high cumulative gas usage (4540546) suggests this deployment was part of a larger batch. The changed solcInputHash also indicates modifications to the compiler input.
#!/bin/bash
# Check for other contracts deployed in the same block
echo "Checking for related deployments..."
rg -l "blockNumber\": 6982719" --type json packages/evm/deployments/sepolia/
# Check for contracts sharing the same solcInputHash
echo "Checking for contracts with shared compiler input..."
rg -l "c9b7037486bd8b1125ffad462d6531cb" --type json
2-2
: Verify contract address references in dependent contracts
The MockInputValidator contract has been redeployed to a new address. Ensure all dependent contracts and configurations are updated to reference the new address.
Also applies to: 34-34
packages/evm/deployments/sepolia/MockComputeProvider.json (3)
57-57
: Verify solc input hash consistency.
The solcInputHash
has been updated to c9b7037486bd8b1125ffad462d6531cb
.
Let's verify if this hash is consistent across related mock contracts:
#!/bin/bash
# Description: Check solc input hash consistency
# Test: Search for the new solc input hash in other deployment files
echo "Checking solc input hash consistency..."
rg "c9b7037486bd8b1125ffad462d6531cb" packages/evm/deployments/sepolia/
2-2
: Verify the new contract deployment details.
The contract has been redeployed with:
- New address:
0xbB2735f8190c023c1523858a2dcdF9726C895F18
- New deployer:
0x8837e47c4Bb520ADE83AAB761C3B60679443af1B
- New tx hash:
0xb9f2d9641189b761c66fc496da0bbcf9914d6a40ffbd37ea613c71b3f2e50a1d
Let's verify the deployment transaction and contract code:
Also applies to: 39-39, 42-44
✅ Verification successful
Contract deployment details are consistent with the Sepolia testnet deployment
The verification shows:
- The contract address
0xbB2735f8190c023c1523858a2dcdF9726C895F18
is uniquely referenced in MockComputeProvider.json - The deployer address
0x8837e47c4Bb520ADE83AAB761C3B60679443af1B
is consistently used across all contract deployments in the Sepolia environment, including:- NaiveRegistryFilter
- MockE3Program
- MockDecryptionVerifier
- MockInputValidator
- CiphernodeRegistryOwnable
- Enclave
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the contract deployment on Sepolia
# Test 1: Check if this address is referenced in other deployment files
echo "Checking for contract address references..."
rg -l "0xbB2735f8190c023c1523858a2dcdF9726C895F18" packages/evm/deployments/sepolia/
# Test 2: Check if the deployer address is consistent across other deployments
echo "Checking deployer address consistency..."
rg "0x8837e47c4Bb520ADE83AAB761C3B60679443af1B" packages/evm/deployments/sepolia/
Length of output: 1532
47-51
: Verify block details on Sepolia.
The contract was deployed in:
- Block: 6982717
- Block hash:
0x376831e31160384cdafcc7e8522c8a72d8f8ad4b3a11509c8deaba957e04264c
- Cumulative gas: 6411800
Let's verify if other contracts were deployed in the same block:
✅ Verification successful
Block details for MockComputeProvider deployment are consistent
The verification confirms that:
- The block hash and transaction hash are unique to the MockComputeProvider deployment
- The deployment details are consistent within the file
- No other contracts were deployed in the same block/transaction
The deployment information appears to be accurate and properly recorded in the Sepolia testnet deployment artifacts.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for other contracts deployed in the same block
# Test: Search for the block number in other deployment files
echo "Checking for other contracts deployed in block 6982717..."
rg "blockNumber\": 6982717" packages/evm/deployments/sepolia/
Length of output: 618
Script:
#!/bin/bash
# Let's verify the block details more thoroughly
# Check for the block hash across deployment files
echo "Checking for block hash..."
rg "blockHash\": \"0x376831e31160384cdafcc7e8522c8a72d8f8ad4b3a11509c8deaba957e04264c\"" packages/evm/deployments/sepolia/
# Check for the transaction hash
echo -e "\nChecking for transaction hash..."
rg "transactionHash\": \"0xb9f2d9641189b761c66fc496da0bbcf9914d6a40ffbd37ea613c71b3f2e50a1d\"" packages/evm/deployments/sepolia/
# List all deployment files to ensure we're not missing any
echo -e "\nListing all deployment files..."
fd . packages/evm/deployments/sepolia/ -e json
Length of output: 1608
packages/evm/deployments/sepolia/MockE3Program.json (3)
146-146
: Contract interface remains stable
The contract has been recompiled (new solcInputHash: 3d9e1a948fbfdecab1738e926b737452
) but maintains the same interface, ensuring backward compatibility.
163-168
: Storage layout changes are non-breaking
The changes in storage layout are limited to internal identifiers (astId and type identifier) and don't affect the contract's storage structure or compatibility.
Also applies to: 172-176
2-2
: Verify deployment consistency with related contracts
The contract has been redeployed with:
- New address:
0x8C8EfB661eb4Fea3b82aF8253F0Eb542E06A0EA2
- Input validator address (constructor arg):
0xd6e450c59c3b4886507e608B39AcAcd1E06C06c6
Let's verify the deployment consistency:
Also applies to: 129-130, 143-143
✅ Verification successful
Let me gather more information about the MockInputValidator deployment to verify its consistency.
Let me check the Enclave contract deployment since it's likely to be the main contract that interacts with both MockE3Program and MockInputValidator.
Based on the gathered information, I can now provide the final response:
Deployment consistency verified for MockE3Program and related contracts
The deployment is consistent:
- MockE3Program is correctly deployed at
0x8C8EfB661eb4Fea3b82aF8253F0Eb542E06A0EA2
- MockInputValidator is correctly deployed at
0xd6e450c59c3b4886507e608B39AcAcd1E06C06c6
and referenced as constructor arg - Both contracts are properly referenced in the test contracts directory
- The Enclave contract is deployed and configured to handle these mock contracts
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the input validator address exists in other deployment files
# and verify cross-contract references
# Search for the input validator address in other deployment files
echo "Checking references to input validator address..."
rg -l "0xd6e450c59c3b4886507e608B39AcAcd1E06C06c6" packages/evm/deployments/sepolia/
# Search for references to the new MockE3Program address
echo "Checking references to new MockE3Program address..."
rg -l "0x8C8EfB661eb4Fea3b82aF8253F0Eb542E06A0EA2" packages/evm/deployments/sepolia/
Length of output: 552
Script:
#!/bin/bash
# Check the content of MockInputValidator.json to verify its deployment details
echo "Content of MockInputValidator.json:"
cat packages/evm/deployments/sepolia/MockInputValidator.json
# Check if there are any other contracts that might need to reference these addresses
echo -e "\nChecking for potential contract references:"
fd -e json . packages/evm/deployments/sepolia/ --exec grep -l "address"
Length of output: 6919
Script:
#!/bin/bash
# Check the Enclave contract deployment to verify contract interactions
echo "Content of Enclave.json:"
cat packages/evm/deployments/sepolia/Enclave.json
# Also check if there are any direct references to these contracts in the source code
echo -e "\nChecking source code references:"
rg -l "MockE3Program|MockInputValidator" packages/evm/contracts/
Length of output: 232272
packages/evm/deployments/sepolia/NaiveRegistryFilter.json (4)
2-2
: LGTM! Contract redeployment details are consistent.
The contract has been successfully redeployed with updated address and transaction details. The higher block number and increased cumulative gas usage are consistent with a new deployment on Sepolia.
Also applies to: 300-309
347-347
: LGTM! Deployment count reset.
The reduction in deployment count from 3 to 1 appears to be part of deployment cleanup or consolidation.
348-349
: LGTM! Deployment configuration maintained.
The deployment maintains consistent compiler settings and optimization parameters:
- Solidity version: 0.8.27
- Optimizer: enabled (800 runs)
- Implementation: unchanged (same metadata hash)
343-346
: Verify the new registry address configuration.
The registry address has been updated to 0x3da5e74858c42F57C641B30ce2Fd255603e0551C
. This change requires verification to ensure:
- The new registry contract is properly deployed and configured
- The contract is compatible with the
NaiveRegistryFilter
Run the following script to verify the registry contract:
✅ Verification successful
Let me generate additional verification scripts to check the implementation and compatibility:
Let me try one more verification approach to check the contract implementations:
Based on the gathered information, I can now provide the final response:
Registry update is properly configured and compatible
The new registry address 0x3da5e74858c42F57C641B30ce2Fd255603e0551C
is a valid deployment of CiphernodeRegistryOwnable
which correctly implements the ICiphernodeRegistry
interface. The contract:
- Implements all required interface methods including
requestCommittee
,publishCommittee
, andisCiphernodeEligible
- Has proper access control via
onlyOwner
andonlyEnclave
modifiers - Is compatible with the
NaiveRegistryFilter
contract's expected interactions
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the new registry contract deployment and interface compatibility
# Test 1: Check if the new registry contract exists and is verified
rg -A 5 "0x3da5e74858c42F57C641B30ce2Fd255603e0551C"
# Test 2: Search for ICiphernodeRegistry interface implementation
ast-grep --pattern 'contract $_ is ICiphernodeRegistry'
Length of output: 42836
Script:
#!/bin/bash
# Check if CiphernodeRegistryOwnable implements ICiphernodeRegistry interface methods
ast-grep --pattern 'function isCiphernodeEligible(address ciphernode) external returns (bool)'
# Check if the registry contract has the required interface methods
ast-grep --pattern 'function requestCommittee(uint256 e3Id, address filter, uint32[2] calldata threshold) external returns (bool success)'
# Check if the registry contract has the publish method
ast-grep --pattern 'function publishCommittee(uint256 e3Id, bytes calldata proof, bytes calldata publicKey) external'
# Check if there are any previous interactions between these contracts
rg -A 2 "0x3da5e74858c42F57C641B30ce2Fd255603e0551C.*0x8837e47c4Bb520ADE83AAB761C3B60679443af1B"
Length of output: 456
Script:
#!/bin/bash
# Search for CiphernodeRegistryOwnable implementation
rg -A 10 "contract CiphernodeRegistryOwnable"
# Check for any deployment history or configuration
rg -A 5 "CiphernodeRegistryOwnable" packages/evm/deployments/
# Look for interface implementation in source files
fd -e sol . | xargs cat | rg -A 5 "ICiphernodeRegistry"
Length of output: 309818
Summary by CodeRabbit
New Features
Bug Fixes
Chores