Skip to content

Move#46

Merged
jamesatomc merged 2 commits into
kanari-sdkfrom
move
Jun 1, 2025
Merged

Move#46
jamesatomc merged 2 commits into
kanari-sdkfrom
move

Conversation

@jamesatomc

Copy link
Copy Markdown
Member

This pull request introduces significant updates to the Move module deployment and interaction functionality, streamlines the CLI commands, and enhances documentation for Move VM operations. The most important changes include removing the --mvsm-file parameter, simplifying the Publish struct and its execution logic, renaming an example file for clarity, and adding comprehensive Move VM API documentation.

Move CLI Updates:

  • Removed the --mvsm-file parameter from the handle_move_command function to simplify the command structure. (crates/command/src/move_cli/mod.rs, [1] [2]
  • Updated the Publish struct in publish.rs to reduce the default gas budget, simplify descriptions, and refactor the deployment logic for better modularity and error handling. (crates/kari-move/src/base/publish.rs, crates/kari-move/src/base/publish.rsL6-R216)

File and Dependency Adjustments:

Documentation Enhancements:

  • Added a new section to the RPC API documentation detailing Move VM operations, including listing modules, deploying modules, estimating gas, and more. (crates/rpc/rpc-api/1.Blockchain.md, crates/rpc/rpc-api/1.Blockchain.mdR187-R297)

Summary

Summary about this PR

  • Closes #issue

- Implemented secure storage for MVSM modules in the VM, replacing file-based storage with RocksDB.
- Added error handling and validation for empty keys in storage operations.
- Improved staking logic with additional checks for zero amounts and existing stakes.
- Enhanced reward processing with overflow protection and validation for block heights.
- Refactored staking state save/load functions to include comprehensive error handling.
- Introduced logging for better traceability of storage operations and staking processes.
- Added limits to prevent excessive memory usage during key retrieval in storage.
- Added `publish.rs` for handling deployment of Move modules to the blockchain, including signature verification and gas estimation.
- Introduced `storage.rs` to manage VM state persistence using RocksDB, including comprehensive metadata and module summaries.
- Created utility functions in `utils.rs` for path management, object ID generation, and module dependency retrieval.
- Defined `VMModule` structure in `vm_module.rs` for representing Move modules, with functions for loading and serializing modules to secure storage.
- Established `vm_state.rs` to manage the VM state, including module registration and state retrieval with variations.
- Developed `vm_transaction.rs` for creating and executing VM transactions, including conversion from blockchain transactions.
- Enhanced `process_vm_transaction` in `simulation/mod.rs` to handle VM function calls and integrate with the blockchain transaction system.
- Updated transaction processing logic to accommodate VM transactions and ensure proper execution and error handling.
@netlify

netlify Bot commented Jun 1, 2025

Copy link
Copy Markdown

Deploy Preview for movekari canceled.

Name Link
🔨 Latest commit ca1d010
🔍 Latest deploy log https://app.netlify.com/projects/movekari/deploys/683c98359e454600089660b5

@jamesatomc jamesatomc merged commit 47ee442 into kanari-sdk Jun 1, 2025
7 of 8 checks passed
@netlify

netlify Bot commented Jun 1, 2025

Copy link
Copy Markdown

Deploy Preview for whitepaperkari canceled.

Name Link
🔨 Latest commit ca1d010
🔍 Latest deploy log https://app.netlify.com/projects/whitepaperkari/deploys/683c9835600b130008abb6c5

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