-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/dockerized application for local testing #11
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…oofs Add core functionality to verify L2 block headers using STARK proofs: - Implement proof generation and verification logic - Add error handling for image_id conversions - Support optional proof generation skipping for testing - Include test binary for verification flow validation This change provides the foundational logic for verifying block header validity and inclusion using zero-knowledge proofs, to be used by other components of the system.
- Enhanced error descriptions in PublisherError, AccumulatorError, and ValidatorError - Added more detailed context and potential causes for errors - Improved consistency in error message formatting - Added debugging suggestions for critical errors - Included potential causes for EmptyHeaders and InvalidProofsCount errors The improved error messages provide better context for debugging and make it easier to understand and resolve issues when they occur. Each error now includes more specific information about what went wrong and, where applicable, suggestions about potential causes or solutions.
- Add structured logging with spans for better context tracking - Improve error logging with detailed context and error messages - Add high-level progress tracking for proof generation - Implement consistent logging patterns across MMR state management - Optimize log verbosity to focus on key operational events - Add debug logs for detailed troubleshooting capabilities
- Added input validation to prevent invalid states and improve robustness. - Improved error handling by providing specific error messages and using error variants. - Enhanced tracing with spans and detailed error messages for better debugging. - Applied changes to ValidatorBuilder, BatchProcessor, MMRStateManager, and ProofGenerator. - Ensured no panics occur from invalid inputs and all error cases are properly handled.
- Add structured logging with tracing macros across all modules - Implement span instrumentation for key operations - Add debug and info level logs for important state changes - Include meaningful context in log messages - Skip sensitive data in instrumentation - Add logging for: - MMR state operations - Account creation and verification - Provider RPC calls - Hex conversions This improves observability and debugging capabilities across the starknet-handler crate.
- Add verification of MMR roots against onchain state - Extract MMR root verification into separate methods for better modularity: - verify_mmr_roots: orchestrates the verification process - verify_single_mmr_root: handles individual MMR root verification - Create mapping between batch indexes and onchain roots for efficient lookup - Add skip_proof option to bypass verification during testing - Add tracing info for both verification and skip scenarios This change ensures MMR roots match their onchain counterparts, maintaining data integrity between L1 and L2. The skip_proof option facilitates testing and development workflows.
- Update error construction to use struct variant syntax with named fields - Align with AccumulatorError enum definition where InvalidBlockRange expects {start_block, end_block} fields - Fix compiler error in get_block_headers_by_block_range method
- Fix hex conversion handling in starknet-handler for U256 values - Update dependencies in common and ethereum crates - Enhance proof generator validation checks - Improve accumulator state handling - Update messaging configuration
- Simplify log messages to focus on essential information - Remove redundant context from log statements - Maintain critical state information in error scenarios
- Add Dockerfile.client for building the client binary - Configure vendored dependencies for offline builds - Set up multi-stage build for minimal runtime image - Add proper file permissions and ownership handling
WIP: client Dockerfile needs fixing for vendored dependencies
- Add new Dockerfile.build-mmr for building and running build-mmr binary - Install Foundry and required dependencies in container - Update docker-compose.yml to use new build-mmr container - Add .env.local.docker to gitignore - Configure container to use existing Anvil instance
- Add retry_command function with exponential backoff - Implement retries for forge script to handle Anvil startup delays - Add better error messaging for deployment attempts Fixes issue with deployment failing due to Anvil not being ready
- Simplify cargo config to handle crates-io and vendored sources - Update patch section to explicitly target crates.io-index - Fix client binary path and volume mount conflicts - Add cargo fetch step for git dependencies Resolves build error with sha2 patch resolution and client binary location
- Replace unwrapping provider setup with proper error handling - Use try_on_anvil_with_wallet_and_config to return Result - Add detailed error messages for retry mechanism - Improve error logging for debugging purposes Resolves panic from Anvil timeout errors by implementing proper retry logic and error handling.
- Replace Ubuntu base image with Alpine Linux 3.19 - Simplify package installation using apk - Remove GPG key management steps - Use Alpine's SSL libraries for runtime dependencies
- Copy binary to /usr/local/bin instead of working directory - Add executable permissions with chmod - Switch to CMD from ENTRYPOINT - Follow consistent pattern with client Dockerfile
- Confirm command matches Dockerfile CMD instruction - Ensure consistent service definition with other containers - Maintain existing dependency chain
- Create minimal workspace with only required crates - Configure static OpenSSL linking with openssl-libs-static - Add necessary build dependencies (gcc, pkgconfig) - Use specific Alpine mirror for reliability - Fix dependency resolution by creating minimal workspace - Optimize multi-stage build process
- Modified Dockerfile.relayer to use sh shell - Updated docker-compose.yml to use /bin/sh instead of /bin/bash - Converted run_relayer.sh to use POSIX-compliant shell syntax This change reduces the container size by avoiding the need to install bash and makes the setup more compatible with Alpine Linux's default shell.
- Split deploy-contracts.sh into separate Ethereum and Starknet deployment scripts - deploy-ethereum.sh handles L1 contract deployment and updates messaging config - deploy-starknet.sh handles L2 contract deployment - Updated docker-compose.yml to run deployments in correct order: * deploy-ethereum runs after anvil * katana runs after ethereum deployment * deploy-starknet runs after katana * other services depend on starknet deployment
- Fix anvil.messaging.json not being updated after ethereum deployment - Add proper error handling for json updates - Create temporary files in same directory to avoid permission issues
- Add deploy_contracts function with 3 retry attempts - Add 10 second timeout between retries - Improve error handling and feedback messages
- Change restart policy from 'always' to 'on-failure:3' - Prevent continuous restart loop while maintaining resilience
- Remove ENTRYPOINT and CMD directives - Allow docker-compose to control the container entry point - Enable proper logging from run_relayer.sh script
- Add retry mechanism to run_relayer.sh - Configure different retry settings for local/prod environments - Remove restart policy from docker-compose - Update healthcheck to monitor script process - Improve logging and error handling
- Remove ENV_FILE check from run_relayer.sh - Add RELAYER_INTERVAL environment variable with default 720 minutes - Set 10-minute interval for local development in docker-compose - Simplify configuration management
ametel01
changed the title
Feat/build mmr container
Feat/dockerized application for local testing
Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.