Skip to content

TVM compatibility fixes#133

Merged
bvscd merged 2 commits into
release/node/v0.6.1from
tvm
May 5, 2026
Merged

TVM compatibility fixes#133
bvscd merged 2 commits into
release/node/v0.6.1from
tvm

Conversation

@bvscd
Copy link
Copy Markdown
Collaborator

@bvscd bvscd commented May 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 22:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets TVM/C++ parity by adjusting gas/fee accounting and serialization edge-cases (short-code invalid opcodes, SENDMSG storage usage, storage fee rounding, action list parsing/result_arg), and adds supporting diagnostics/ops improvements across node networking (fastsync overlays, peer resolution, RLDP timeouts/logging) plus an RPC endpoint for exporting libraries in an emulator-friendly form.

Changes:

  • Add a short-code gas fix table and engine hook to charge the C++-compatible gas amount on invalid “partial primitive” opcodes.
  • Align fee/accounting behavior with C++: SENDMSG body root gas charging, storage price selection by latest utime_since, storage fee rounding, and action list/result_arg handling.
  • Improve node operability: build richer collator test bundles, fastsync overlay bootstrap for prev validator set, reusable overlay peer resolver, RLDP outbound hard timeout + better diagnostics, and new getLibrariesExt RPC/openapi/tests.

Reviewed changes

Copilot reviewed 40 out of 54 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/vm/tests/test_cont.rs Adds regression test for invalid short opcodes and expected gas/steps.
src/vm/tests/test_app_specific.rs Adds SENDMSG inline-vs-ref body gas accounting regression test.
src/vm/tests/common/test_framework.rs Adds helper to generate gas-fix data against C++ TVM.
src/vm/src/tests/test_smart_contract_info.rs Adds test for selecting latest storage price by utime_since.
src/vm/src/smart_contract_info.rs Fixes storage price selection logic to choose the latest applicable entry.
src/vm/src/executor/engine/mod.rs Registers/exports new fix_gas engine module.
src/vm/src/executor/engine/fix_gas.rs Introduces FIX_GAS table + short-code detection helper.
src/vm/src/executor/engine/core.rs Hooks short-code detection into execution and adjusts invalid-opcode stepping/gas.
src/vm/src/executor/config.rs Changes storage fee calculation to round after interval summation.
src/vm/src/executor/blockchain.rs Adjusts SENDMSG storage usage gas charging for synthesized inline body/root.
src/node/src/validator/fabric.rs Refactors test-bundle creation on validation failures; plumbs external messages.
src/node/src/validator/collator.rs Tracks accepted external messages for bundling on collator errors.
src/node/src/rpc_server/tests/test_handlers.rs Adds test coverage for getLibrariesExt.
src/node/src/rpc_server/static/openapi.json Documents new /getLibrariesExt endpoint.
src/node/src/rpc_server/handlers.rs Adds getLibrariesExt and includes created_by in block header response.
src/node/src/network/overlay_client.rs Raises query logging to DEBUG and adds result logging.
src/node/src/network/node_network.rs Adds reusable overlay peer resolver worker.
src/node/src/network/full_node_overlays.rs Adds prev-set fastsync overlay bootstrap + DHT peer resolution scheduling/cancel.
src/node/src/network/full_node_overlay_client.rs Adds DEBUG logging around RLDP block downloads.
src/node/src/network/custom_overlay_client.rs Switches custom overlays to shared peer resolver helper.
src/node/src/network/control.rs Updates bundle building call signature (external messages).
src/node/src/full_node/shard_client.rs Raises shard-client tracing logs to DEBUG.
src/node/src/engine.rs Calls special fastsync overlay update during startup.
src/node/src/collator_test_bundle.rs Extends bundles with external messages; improves state simplification coverage.
src/node/simplex/src/tests/test_session_processor.rs Adds test for early shard dispatch timing parity with C++.
src/node/simplex/src/session_processor.rs Splits dispatch vs min-gen timing; adds detailed timing logging.
src/executor/src/transaction_executor.rs Improves action list parsing errors; sets result_arg consistently; adjusts MAX_ACTIONS visibility.
src/executor/src/tests/test_transaction_executor_with_real_data.rs Updates replay helpers and adds regression tests for new parity fixes.
src/executor/src/tests/test_tr_phases.rs Adds tests for invalid/special action list roots and MAX_ACTIONS overflow.
src/executor/src/tests/test_ordinary_transaction.rs Adds result_arg regression tests for action failures; updates expectations.
src/executor/src/tests/common/mod.rs Allows libs input as base64 in replay helper.
src/executor/src/blockchain_config.rs Changes storage fee accumulation/rounding; adds unit test for rounding-after-sum.
src/block/src/transactions.rs Serializes result_arg == Some(0) as absent to match C++ encoding.
src/block/src/tests/test_out_actions.rs Updates tests for new action list unpacking API + special cell rejection.
src/block/src/tests/test_config_params.rs Updates storage fee max test for calc_storage_fee_part.
src/block/src/out_actions.rs Refactors action list unpacking to operate on Cell and return error position.
src/block/src/messages.rs Exposes parsed body_to_ref / init_to_ref accessors.
src/block/src/config_params.rs Splits storage fee calc into “part” (no rounding) for correct rounding placement.
src/block/src/accounts.rs Adds append_cell_no_root_gas variant used by SENDMSG gas parity fix.
src/adnl/src/rldp/mod.rs Limits outbounds via semaphore; adds outbound hard-timeout + diagnostics and JoinSet task management.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/vm/src/executor/engine/core.rs
Comment thread src/vm/src/executor/engine/core.rs
Comment thread src/node/simplex/src/session_processor.rs
Comment thread src/executor/src/tests/test_tr_phases.rs
Comment thread src/executor/src/tests/test_transaction_executor_with_real_data.rs
@bvscd bvscd merged commit 58ad7f8 into release/node/v0.6.1 May 5, 2026
17 checks passed
@bvscd bvscd deleted the tvm branch May 5, 2026 23:53
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.

3 participants