-
Notifications
You must be signed in to change notification settings - Fork 7
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
Integrate Wasm, CipherPodLedger Module and Fix DA Layer and WASM Bugs (#6, #24) #26
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
- Added the initial version of the WASM module. - Updated `app.go` to integrate the new WASM module. - Made necessary adjustments in other related files to support the WASM module. Co-authored-by: Shubham Sharma <[email protected]> Co-authored-by: Kritarth Agrawal <[email protected]> Co-authored-by: Uddesh Jaiswal <[email protected]> Co-authored-by: Saatvik Sharma <[email protected]> Co-authored-by: Hitisha Gohil <[email protected]>
Co-authored-by: Kritarth Agrawal <[email protected]>
The commit updates the dependencies in the go.mod file, specifically theossdk.io/depinject package and the github.com/cometbft/cometbft package.
…sure compatibility with new versions.
- Added support for WASM VM cache metrics using Prometheus in `commands.go` - Imported `wasmkeeper`, `prometheus`, and `cast` packages to enable telemetry features - Introduced `wasmOpts` to configure WASM options dynamically based on telemetry settings - Integrated telemetry handling for `telemetry.enabled` flag using `cast.ToBool` - Updated `app.New` and `appExport` functions to support optional WASM options - Ensured backward compatibility with `emptyWasmOpts` when telemetry is disabled
- Integrated Wasm module into the Cosmos SDK app. - Registered necessary keys, parameters, and handlers for the Wasm module. - Added IBC middleware and routes for Wasm module. - Updated `app.go`, `app_config.go`, and `ibc.go` to include Wasm module logic. - Created `start.sh` for automated node setup and configuration. - Updated `genesis.json`, `app.toml`, `config.toml`, and `client.toml` files. - Known Issues: - Missing error handling in Wasm configuration initialization. - Potential race condition in capability index initialization. - Legacy param subspace registration for Wasm is incomplete.
Bugfix/wasm patch 1
…config.go. Register WasmKeeper in app.go and create wasm middleware for fee-enabled IBC stack in ibc.go.
- Centralized registry for upgrade handlers - Added upgrade handlers for JIP-2 and JIP-3 - Set store loader for upgrades with store changes - Initialized capability index if not set - Defined version map for the upgrades
Integration of wasm module into junction
… Trackgate module - Upgraded `protoc-gen-go-grpc` to v1.5.1, requiring gRPC-Go v1.64.0 or later. - Added `DaBlobData` structure for the Trackgate module, supporting blob data and station reference management. - Enhanced gRPC querier and message service methods to include static options for improved efficiency. - Introduced `UnimplementedQueryServer` and `UnimplementedMsgServer` with additional safeguards against nil pointer dereferences. - Updated generated protobuf files for `junction` and `trackgate` modules, aligning with the latest protobuf and runtime requirements. Co-authored-by: Kritarth Agrawal <[email protected]> Co-authored-by: Saatvik Sharma <[email protected]>
- Introduced a new function `LogBlobData` in the Trackgate module for logging and handling blob data. - Updated gRPC service definitions to include `LogBlobData` functionality. - Enhanced module capabilities to support structured blob data logging for improved traceability and debugging. Co-authored-by: Kritarth Agrawal <[email protected]> Co-authored-by: Saatvik Sharma <[email protected]>
- Implement MsgIntegrityCheck struct methods - Add MsgIntegrityCheckResponse struct methods - Update handler registration for integrity checks - Ensure proper serialization and deserialization - Handle wire type errors during unmarshalling
Co-authored-by: Kritarth Agrawal <[email protected]> Co-authored-by: Saatvik Sharma <[email protected]>
… integration - Added a new file `encoding.go` to create and manage EncodingConfig for testing purposes. - Updated `sim_bench_test.go` and `sim_test.go` to utilize the new `emptyWasmOpts` for application initialization. - Refactored various instances in the codebase to replace `WasmApp` with the more generic `App` type for better compatibility. - Cleaned up commented-out code in `msg_server_log_blob_data.go` and adjusted related tests to ensure proper functionality.
… files - Introduced the Cipherpodledger module, including new protobuf definitions for genesis, packet, params, query, and transaction. - Generated corresponding Go files for the module using protoc-gen-go and protoc-gen-go-grpc. - Implemented message handling and query capabilities for the new module. - Updated existing files in the junction and trackgate modules to ensure compatibility with the new Cipherpodledger module. - Enhanced the overall structure and organization of the codebase to support the new module's functionality.
…module - Introduced the FhvmsMeta message definition in the protobuf file for the Cipherpodledger module, encapsulating essential fields such as chainId, chainName, proofType, and various contract addresses. - Generated corresponding Go files for the FhvmsMeta message to facilitate serialization and deserialization. - Updated OpenAPI documentation to include a new endpoint for querying module parameters, enhancing the API's usability. - Ensured compatibility with existing module structures and improved overall code organization.
…Cipherpodledger module - Added a new PodData message definition in the protobuf file, encapsulating fields such as ascContractAddress, podNumber, daBlobId, submittedBy, status, and timestamp. - Generated corresponding Go files for the PodData message to facilitate serialization and deserialization. - Updated OpenAPI documentation to include a new endpoint for querying module parameters, enhancing the API's usability. - Ensured compatibility with existing module structures and improved overall code organization.
…nd Trackgate modules - Reorganized import statements across multiple files to improve code clarity and maintainability. - Upgraded `protoc-gen-go-grpc` to v1.5.1, ensuring compatibility with the latest gRPC features. - Introduced new fields in the PodData message for proof state updates, enhancing data structure capabilities. - Updated generated protobuf and Go files for the Cipherpodledger and Trackgate modules to reflect recent changes and improvements. - Ensured consistency and compatibility across modules, enhancing overall code organization and functionality.
- Updated the PodData message in protobuf and Go files to replace the zkFHEWitness field with zkFHEPublicInputJson, enhancing clarity in data representation. - Adjusted related methods and field descriptors to ensure consistency across the codebase. - Ensured compatibility with existing functionality while improving the overall structure of the PodData message.
…ger module - Added MsgRegisterFhvm message definition and corresponding Go implementation to facilitate the registration of FHVM metadata, including fields such as chainId, chainName, proofType, and various contract addresses. - Implemented the RegisterFhvm handler in the keeper, ensuring proper storage and validation of FHVM data. - Updated protobuf files and generated Go code to reflect the new message structure and functionality. - Enhanced OpenAPI documentation to include a new endpoint for the RegisterFhvm operation, improving API usability. - Ensured compatibility with existing module structures and improved overall code organization.
…dule - Added MsgSubmitPod message definition and corresponding Go implementation to facilitate the submission of pod data, including fields such as submittedBy, ascChildContractAddress, podNumber, and others. - Implemented the SubmitPod handler in the keeper, ensuring proper storage and validation of pod submissions. - Updated protobuf files and generated Go code to reflect the new message structure and functionality. - Enhanced OpenAPI documentation to include a new endpoint for the SubmitPod operation, improving API usability. - Updated FhvmsMeta message to include latestPodNumber, ensuring compatibility with new pod submission logic. - Ensured overall code organization and compatibility with existing module structures.
…module - Added MsgVerifyPod message definition and corresponding Go implementation to facilitate the verification of pod data, including fields such as submittedBy, stationId, podNumber, provingNetwork, and zkFheproof. - Implemented the VerifyPod handler in the keeper, ensuring proper validation and storage of verification results. - Updated protobuf files and generated Go code to reflect the new message structure and functionality. - Enhanced OpenAPI documentation to include a new endpoint for the VerifyPod operation, improving API usability. - Updated simulation and testing files to support the new verification functionality, ensuring comprehensive coverage and reliability. - Ensured overall code organization and compatibility with existing module structures.
…er module - Added MsgLogBlobData message definition and corresponding Go implementation to facilitate the logging of blob data, including fields such as creator, stationId, podBundle, and podRange. - Implemented the LogBlobData handler in the keeper, ensuring proper handling and storage of logged data. - Updated protobuf files and generated Go code to reflect the new message structure and functionality. - Enhanced OpenAPI documentation to include a new endpoint for the LogBlobData operation, improving API usability. - Updated simulation and testing files to support the new logging functionality, ensuring comprehensive coverage and reliability. - Ensured overall code organization and compatibility with existing module structures.
… code organization - Introduced support for a new DA provider in the MsgLogBlobData message, allowing for the specification of a data provider during blob data logging. - Updated the MsgLogBlobDataResponse to include a status field for better response handling. - Enhanced the LogBlobData handler in the keeper to accommodate the new DA provider logic, ensuring proper validation and response management. - Refactored import statements across multiple files for improved clarity and maintainability. - Updated protobuf definitions and generated Go files to reflect the new message structure and functionality. - Ensured overall code organization and compatibility with existing module structures, enhancing the maintainability of the Cipherpodledger module.
- Added support for Avail and Eigen DA providers in the LogBlobData function, enabling the decoding of respective pod bundles and storage of blob data. - Introduced new types AvailDABlobSpace and EigenDABlobSpace to encapsulate blob data and commitments for each provider. - Implemented decoding functions for Avail and Eigen pod bundles, ensuring proper error handling during the decoding process. - Enhanced the response structure of MsgLogBlobData to reflect successful operations for both DA providers. - Improved overall code organization and maintainability within the Cipherpodledger module.
- Added logic to retrieve and validate station metadata in the LogBlobData function, ensuring that the provided stationId is registered. - Implemented checks for pod range validity against the finality pod number, returning appropriate error messages for invalid inputs. - Improved error handling and response management within the LogBlobData process, enhancing overall robustness and user feedback. - Ensured compatibility with existing module structures while improving code organization and maintainability.
- Introduced MsgIntegrityCheck message definition and corresponding Go implementation to facilitate integrity checks, including fields for creator, stationId, blobRef, and daProvider. - Implemented the IntegrityCheck handler in the keeper, ensuring proper handling and response management. - Updated protobuf files and generated Go code to reflect the new message structure and functionality. - Enhanced OpenAPI documentation to include a new endpoint for the IntegrityCheck operation, improving API usability. - Updated simulation and testing files to support the new integrity check functionality, ensuring comprehensive coverage and reliability. - Ensured overall code organization and compatibility with existing module structures.
…eck handler - Enhanced the IntegrityCheck handler to validate station metadata and blob data for the specified DA provider, including detailed error handling for various scenarios. - Introduced logic for processing blob data specifically for the Celestia DA provider, including unmarshalling and validation of blob references. - Updated the pod data status to "finalized" for the specified range of pods, ensuring accurate tracking of pod states. - Added new utility function GetPodKeyByteForStation to improve pod key retrieval based on station ID. - Enhanced validation in LogBlobData handler to ensure pod range integrity, preventing invalid inputs. - Updated MsgIntegrityCheck message definition to change blobRef from string to byte array for improved data handling. - Ensured overall code organization and compatibility with existing module structures, enhancing maintainability and clarity.
…ic placeholder - Implemented logic to update pod data status to "da blob logged" for specified pod ranges in the LogBlobData function, ensuring accurate tracking of pod states. - Added error handling for missing pod data during updates, improving robustness. - Introduced a placeholder for the Avail DA provider logic in the IntegrityCheck handler, indicating future implementation needs. - Enhanced overall code organization and maintainability within the Cipherpodledger module.
…andler - Enhanced the IntegrityCheck handler to support Avail and Eigen DA providers, including unmarshalling and validation of blob references. - Updated pod data status to "finalized" for specified pod ranges, ensuring accurate tracking of pod states. - Improved error handling for invalid blob references and missing pod data, enhancing robustness. - Updated FHVM metadata and finalized pod count in the database, ensuring consistency across operations. - Refactored code for better organization and maintainability within the Cipherpodledger module.
… Cipherpodledger module - Refactored OpenAPI YAML file to streamline the API documentation for the Cipherpodledger module, ensuring clarity and usability. - Introduced new message definitions for MsgUpdateParams, MsgExec, MsgGrant, and MsgRevoke, enhancing the functionality and flexibility of the module. - Updated existing message structures to improve data handling and validation, including detailed descriptions for parameters and responses. - Enhanced overall organization and maintainability of the OpenAPI documentation, aligning it with the latest module features and requirements. - Ensured compatibility with existing structures while improving the clarity of API endpoints and their respective functionalities.
- Introduced a new query method `GetPod` to retrieve pod data based on station ID and pod number, enhancing the module's querying capabilities. - Updated the OpenAPI documentation to include the new `GetPod` endpoint, improving API usability and clarity. - Refactored import statements across multiple files for better organization and maintainability. - Enhanced existing message definitions and structures to support the new functionality, ensuring compatibility with current module features. - Improved overall code organization and maintainability within the Cipherpodledger module. If this implementation has issues, consider checking out commit 39f7f24.
- Introduced a new message definition for TraditionalPaginationResponse to facilitate pagination in API responses. - Updated the QueryGetPodsResponse to include pagination details, improving data retrieval efficiency. - Added a new query method `GetPods` to retrieve multiple pod data entries with pagination support. - Refactored import statements across multiple files for better organization and maintainability. - Updated OpenAPI documentation to reflect the new pagination features, enhancing API usability and clarity. - Ensured overall code organization and compatibility with existing module structures, improving maintainability. If this implementation has issues, consider checking out commit 39f7f24.
- Introduced a new query method `GetStationMetrics` to retrieve metrics related to station pods, including counts for finalized, submitted, and verified pods. - Added corresponding request and response message definitions for `QueryGetStationMetricsRequest` and `QueryGetStationMetricsResponse`. - Implemented the logic for fetching station metrics in the keeper, ensuring accurate data retrieval from the database. - Updated OpenAPI documentation to include the new `GetStationMetrics` endpoint, enhancing API usability and clarity. - Refactored related files for improved organization and maintainability within the Cipherpodledger module. If this implementation has issues, consider checking out commit 39f7f24.
…in Cipherpodledger module - Streamlined the OpenAPI YAML file to improve clarity and usability for the Cipherpodledger module. - Introduced new message definitions for MsgUpdateParams, MsgExec, MsgGrant, and MsgRevoke, enhancing module functionality. - Updated existing message structures to improve data handling and validation, with detailed descriptions for parameters and responses. - Enhanced overall organization and maintainability of the OpenAPI documentation, aligning it with the latest module features and requirements. - Ensured compatibility with existing structures while improving the clarity of API endpoints and their respective functionalities. If this implementation has issues, consider checking out commit 39f7f24.
Enhance Wasm Support with Patch 3 Updates
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.
Description:
This pull request addresses the following key enhancements and fixes:
1. WASM Integration for RUST Contract Deployment (#6):
app.go
file for seamless interaction with the Junction chain.2. Enhancements in Data Availability Layer (#24):
LogBlobData
for effective blob data logging and traceability.IntegrityCheck
function to validate and ensure blob data integrity.3. WASM Module Bug Fixes (#24):
Closing Issues:
Closes #6, #24
Acceptance Criteria:
LogBlobData
andIntegrityCheck
) implemented and validated in the DA layer.