Skip to content

Conversation

@faddat
Copy link
Owner

@faddat faddat commented Jan 24, 2025

No description provided.

- Updated `MockEnv` to use `types.Uint64` for time representation.
- Introduced helper functions for memory operations: `readMemory` and `writeMemory`.
- Replaced direct memory read/write calls in `hostGet` and other functions with the new helpers.
- Removed the `MemoryAllocator` struct and related functions, simplifying memory management.
- Cleaned up unused code and deleted obsolete files in the `libwasmvm` directory.
- Adjusted function signatures and error handling for better clarity and consistency.

This commit enhances the overall structure and readability of the codebase while ensuring proper memory handling.
run tests
chipshort and others added 30 commits February 13, 2025 11:53
This commit introduces several key changes:
- Moved host functions to a separate package
- Simplified host function registration
- Updated memory management and region handling
- Added String() method to Checksum type for hex encoding
- Improved error handling and logging in host functions
- Restructured runtime interfaces for better modularity
Modify the Secp256k1RecoverPubkey method call to match the updated function signature, which now returns an additional value. This change ensures compatibility with the latest API implementation.
This commit extends the cryptographic capabilities of the library by:
- Adding BLS12-381 cryptographic function signatures to the GoAPI type
- Updating host crypto functions to use new runtime and memory management
- Implementing gas charging for BLS12-381 operations
- Refactoring import paths and function signatures for crypto-related methods
This commit introduces comprehensive gas management modules for the WasmVM runtime:
- Created gas package with core GasState implementation
- Added gas configuration modules for different CosmWasm versions (v1.x and v2.x)
- Implemented default gas configuration methods
- Structured gas tracking and consumption logic
- Prepared foundation for flexible gas metering across runtime versions
…anagement

This commit introduces a new WasmRuntime interface that defines a comprehensive set of methods for managing WebAssembly smart contract lifecycles, including:
- Code storage and management operations
- Contract instantiation, execution, and migration methods
- IBC (Inter-Blockchain Communication) entry points
- Caching and resource management
- Metrics retrieval

The interface provides a flexible and extensible approach to handling WASM contract interactions across different runtime environments.
This commit introduces several improvements to the internal API library:
- Simplified runtime initialization and cache management
- Enhanced error handling with more descriptive error messages
- Removed unused methods and simplified function signatures
- Updated import paths to reflect new package structure
- Added more descriptive comments for public functions
- Streamlined code storage and contract lifecycle methods

The changes improve code readability, error reporting, and overall maintainability of the WASM runtime library.
…tions

This commit introduces significant improvements to the crypto and runtime modules:
- Added new cryptoapi interfaces for crypto operations
- Implemented comprehensive BLS12-381 cryptographic functions
- Created new gas management and runtime type definitions
- Updated host functions to use new crypto and runtime interfaces
- Improved gas metering and configuration handling
- Enhanced memory and context management for contract execution

The changes provide a more modular, flexible, and extensible approach to cryptographic operations and runtime management in the WasmVM library.
This commit enhances the WasmVM library's cryptographic capabilities by:
- Implementing host functions for secp256k1, ed25519, and BLS12-381 cryptographic operations
- Adding a new RegisterHostFunctions method to export crypto functions to WebAssembly modules
- Introducing a ReadUint32 utility method in the memory manager for reading 32-bit integers
- Implementing gas charging for various cryptographic verification operations
- Improving memory management for batch verification and key recovery functions

The changes provide a more comprehensive and flexible approach to handling cryptographic operations in the WebAssembly runtime.
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.

4 participants