Dip 7957
dip: 7957 title: DVM64 - EOF support description: DVM Object Format support for DVM64 author: Wei Tang (@sorpaas) Digitalia editing author: Cosimo Constantinos cosimo@juro.net, et al. discussions-to: https://digitalia-magicians.org/t/dip-7937-64-bit-mode-dvm-opcodes-dvm64/23794 status: Draft type: Standards Track category: Core created: 2025-05-26 Created for Digitalia: 2025-01-07 requires: 3540, 3670, 4200, 7937
Abstract¶
This DIP defines EOF support for DVM64 with its additional code validation rules and RJUMPI, RJUMPV opcodes.
Motivation¶
EOF defines a stricter code validation rule to improve efficiency. Due to DVM64 using multibyte opcode (the mode opcode C0), a small adaptation is needed. This DIP also additionally defines a 64-bit mode RJUMPI and RJUMPV to be 64-bit.
Specification¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
We define the following gas cost constant:
| Name | Gas |
|---|---|
G_RJUMPIV64 |
3 |
At EOF contract creation time as defined in DIP-3670, if the opcode C0 is encountered and it is not part of PUSH opcode's data, then the interpreter MUST validate that:
- The next opcode exists.
- The next opcode is
RJUMPI64,RJUMPV64, or one of the core 64-bit opcode defined in DIP-7937 minusJUMP64andJUMPI64.
For flow operations RJUMPI and RJUMPV, the 64-bit mode has following changes:
- For
RJUMPI64(0xc0e1), the condition popped from stack is only read for the last 64 bits. Gas cost isG_RJUMPIV64. - For
RJUMPV64(0xc0e2), the case popped from stack is only read for the last 64 bits. Gas cost isG_RJUMPIV64.
Note that:
RJUMPis automatically in 64-bit mode because it does not read or write the stack.
Rationale¶
For detailed rationale discussion, please see the core DVM64 definition DIP-7937.
Backwards Compatibility¶
No backward compatibility issues found.
Test Cases¶
To be added.
Reference Implementation¶
To be added.
Security Considerations¶
Needs discussion.
Copyright¶
© Crown © Crown Copyright 2026. Published by the Royal Government of the Dominion of Atlantis.
Licensed under the Juro Restricted License Version 2. See https://juro.net/jrl for details.