TVM on Tetra

Tycho and TON TVM Compatibility

TON and Tycho are fully compatible at the TVM level, meaning they share the same execution model. Tycho, however, uses its own Rust-based TVM implementation.

The differences only appear in specific opcodes and related rules. Understanding them is useful for developers working across multiple networks.

Key Differences

1. Replay Attack Protection

Tycho provides built-in protection against replay attacks between networks.

  • No extra action is required from developers.

  • Certain opcodes, such as CHKSIGNU and CHKSIGNS, are affected, so it’s helpful to understand how this mechanism works.

2. BLS Cryptography

  • BLS cryptography is not implemented in Tycho TVM.

Opcode

Opcode
Tycho
TON

SIGNDOMAIN

SIGNDOMAIN_POP

SIGNDOMAIN_PUSH

BLS_VERIFY

BLS_AGGREGATE

BLS_FASTAGGREGATEVERIFY

BLS_AGGREGATEVERIFY

BLS_G1_ADD

BLS_G1_SUB

BLS_G1_NEG

BLS_G1_MUL

BLS_G1_MULTIEXP

BLS_G1_ZERO

BLS_MAP_TO_G1

BLS_G1_INGROUP

BLS_G1_ISZERO

BLS_G2_ADD

BLS_G2_SUB

BLS_G2_NEG

BLS_G2_MUL

BLS_G2_MULTIEXP

BLS_G2_ZERO

BLS_MAP_TO_G2

BLS_G2_INGROUP

BLS_G2_ISZERO

BLS_PAIRING

BLS_PUSHR

CHKSIGNU

CHKSIGNS

Others

SIGNDOMAIN Opcodes

Tycho introduces SIGNDOMAIN* opcodes to manage the signature domain stack:

Opcode
Behavior

SIGNDOMAIN

Pushes the current signature domain onto the stack.

SIGNDOMAIN_POP

Pushes the current domain and then removes it from the stack.

SIGNDOMAIN_PUSH

Adds a new signature domain to the stack and sets it as current.

Last updated