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

Lots of updates #1

Merged
merged 36 commits into from
Oct 9, 2024
Merged

Lots of updates #1

merged 36 commits into from
Oct 9, 2024

Conversation

wkennedy
Copy link
Owner

@wkennedy wkennedy commented Oct 9, 2024

No description provided.

The debug logging setup in the main function of the 'example' module has been removed, simplifying the code. Additionally, the 'data_availability' member has been removed from the workspace in Cargo.toml, reflecting a change in the project structure.
Refactor code by removing unused variables and imports for cleaner and more maintainable code. Changed variable `successful_txs` to immutable, removed unused variable `fork_graph`, and excluded unnecessary variable `key` in a loop. Removed unused import `Epoch` from `processor.rs`.
Eliminated deprecated utility functions for creating and managing mock environments from `processor.rs`. These functions were no longer in use and their removal helps to streamline the codebase.
Added a new proof-verify program under trollup-solana-programs. Updated project dependencies in Cargo.toml files to include the new state module and renamed trollup-solana-program to validator-signature-verify.
This commit introduces two new crates: `validator` and `zk`. The `validator` crate contains the "trollup-validator" package and its related functionalities, including HTTP endpoints for proving and health checks. The `zk` crate provides functions for zero-knowledge proof validation.
Updated the transaction pool to use Arc<Mutex<...>> for thread safety. Added a Warp web server to the validator module, providing handlers for health check, sending transactions, and proof validation.
The project no longer requires the trollup-solana-programs/on-chain-program-example in its members list. This change streamlines the dependencies and reflects the current state of the project.
Refactor `main.rs` to use a Trollup API client for health checks and transaction submissions, replacing local execution engine and state management logic. Add new dependencies to `Cargo.toml` and expand `handler.rs` methods to manage transactions using the API.
Added Dockerfile and .dockerignore for both `api` and `validator`. Improved execution engine and state commitment handling in `main.rs` and introduced configuration management with `config.rs`. Enhanced transaction processing by removing unnecessary comments and adding utility methods.
Enhanced logging messages for consistency and clarity across components. Updated configuration loading mechanisms and refactored code to remove redundant imports and improve readability.
Modified `ZkProofCommitment` structure to include recovery_id and expanded public_key, removed inactive zk-proof system code, and enhanced Solana program with secp256k1 signature recovery. Adjusted configuration to include program_id and updated related logic in validator and state commitment layers to align with these changes.
The merkle package and its references were deleted. This includes removing `merkle/` from the workspace and `example/Cargo.toml`, and deleting the `merkle` directory along with its `Cargo.toml` and source files.
Removed `example/src/main_old.rs` as it contains outdated code not in use. Updated other files to enhance readability and consistency. Added detailed documentation to the execution and state management systems to facilitate easier maintenance and understanding for future developers.
Integrated the 'log' crate to allow for logging within the project. Updated `Cargo.toml` to include `log` version 0.4.22 and modified `main.rs` to use the `info` macro for logging.
Integrated state management handlers for account, transaction, and block data. Improved the API routes to handle get, get-all, and latest queries for accounts, transactions, and blocks. Also added sha2 dependency and refactored the program ID.
Introduce optimistic transaction routing and handling in API. Replace standard mutex with async tokio::sync::Mutex across project, enhancing async performance. Add new mermaid diagram in README to illustrate block structure. Improve state management with new state and transaction tree composites, ensuring robust handling of state alterations.
Introduced functions to handle the optimistic state commitments including recording, validating, and removing state records. Refactored the `StateCommitment` struct to include optimistic commitment state management and updated the verifier to handle pending state packages.
Renamed PendingStateCommitmentPackage to StateCommitmentPackage and added optional state_root field. Introduced CommitmentResultType enum and related structures for handling different commitment statuses. Modified methods and function signatures to accommodate these changes and cleaned up redundant code.
Renamed `Config` to `TrollupConfig` for better clarity and extended its functionality by adding support for new configuration sources and fields. Modified various parts of the codebase to use `TrollupConfig`, and updated configuration loading to include the new fields from `config.toml` and `trollup-api-config.json`.
Replaced Config with TrollupConfig to ensure consistency across the codebase. Updated function signatures and imports accordingly. This change simplifies the configuration management and avoids confusion between different config types.
Deleted the duplicate `config.rs` and moved the `TrollupConfig` to the `state` module. Updated various modules to utilize `lazy_static!` for global configuration sharing, replacing hard-coded values and file-specific configuration loading.
Delete outdated config.rs and related references, refactor proof verification for improved modularity and clarity. Added logging and new environment configurations along with minor fixes and updates across various modules.
Introduce a new Trollup initialization program to set up Solana local configurations, including necessary dependencies and example integration. This setup enhances the initialization process, allowing for smoother Solana environment configuration and transaction management.
Added an ApiResponse model to standardize responses and refactored transaction handling to use this model. Updated several functions to ensure consistent response handling and improved transaction validation logic within the commitment flow.
This commit introduces a new OpenAPI specification to the project to streamline documentation and API interaction. Additionally, it extends the state commitment logic and serde compatibility, incorporating several new dependencies and restructuring sections of the code to enhance readability and maintainability. The end result is a more robust and feature-complete system.
Removed the obsolete `api.json` configuration file and added centralized keypair handling. The keypair is now read from a specified JSON file, streamlining key management across the application. This ensures consistent key usage and improves security practices.
Introduce new Dockerfiles for API and Validator services, enabling separate build and runtime stages. Updated `Cargo.toml` to include the `api` and `validator` modules in workspace members and modified configurations for logging and key paths.
Introduce new Dockerfiles for API and Validator services, enabling separate build and runtime stages. Updated `Cargo.toml` to include the `api` and `validator` modules in workspace members and modified configurations for logging and key paths.
Introduce new Dockerfiles for API and Validator services, enabling separate build and runtime stages. Updated `Cargo.toml` to include the `api` and `validator` modules in workspace members and modified configurations for logging and key paths.
Introduce new Dockerfiles for API and Validator services, enabling separate build and runtime stages. Updated `Cargo.toml` to include the `api` and `validator` modules in workspace members and modified configurations for logging and key paths.
Replaced direct file read operations with `read_keypair_file` for better error handling and configurability. Updated configuration paths to be relative in `trollup-api-config.json`. This change enhances the flexibility and maintainability of keypair management across different environments.
Remove the obsolete Dockerfile in `api` and introduce a configuration JSON for the API in `api/config/docker`. Additionally, refactor WebSocket connection logic to handle reconnections and improve error logging.
Introduce a periodic ping mechanism to the WebSocket connection to detect and handle lost connections more effectively. Additionally, include a new `docker-compose.yml` file and adjust key configuration paths to support running the application via Docker containers.
This commit removes the `example.rs` file from zk/src, updates the README with detailed descriptions of Trollup's rollup mechanisms, and simplifies the state_commitment documentation. These changes enhance clarity and readability while also discarding obsolete code.
@wkennedy wkennedy merged commit 2fa7466 into main Oct 9, 2024
1 check failed
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.

1 participant