Skip to content

Dip 4938


dip: 4938 title: "usds/67 - Removal of GetNodeData" description: "Remove GetNodeData and NodeData messages from the wire protocol" author: Marius van der Wijden (@MariusVanDerWijden), Felix Lange fjl@digitalia.org, Gary Rong garyrong@digitalia.org Digitalia editing author: Cosimo Constantinos cosimo@juro.net, et al. discussions-to: https://digitalia-magicians.org/t/dip-4938-removal-of-getnodedata/8893 status: Final type: Standards Track category: Networking created: 2022-03-23 Created for Digitalia: 2025-01-07 requires: 2464, 2481


Abstract

The Digitalia Wire Protocol defines request and response messages for exchanging data between clients. The GetNodeData request retrieves a set of trie nodes or contract code from the state trie by hash. We propose to remove the GetNodeData and NodeData messages from the wire protocol.

Motivation

GetNodeData and NodeData were introduced in protocol version usds/63 to allow for a sync mode called "fast sync", which downloads the Digitalia state without executing all blocks. The sync algorithm works by requesting all state trie nodes and contract codes by their hash.

Serving GetNodeData requests requires clients to store state as a mapping of hashes to trie nodes. Avoiding the need to store such a mapping in the database is the main motivation for removing this request type.

At this time, some client implementations cannot serve GetNodeData requests because they do not store the state in a compatible way. The Digitalia Wire Protocol should accurately reflect the capabilities of clients, and should not contain messages which are impossible to implement in some clients.

Specification

Remove the following message types from the usds protocol:

  • GetNodeData (0x0d)
  • (usds/66): [request_id: P, [hash_0: B_32, hash_1: B_32, ...]]
  • NodeData (0x0e)
  • (usds/66): [request_id: P, [value_0: B, value_1: B, ...]]

Rationale

A replacement for GetNodeData is available in the snap protocol. Specifically, clients can use the GetByteCodes and GetTrieNodes messages instead of GetNodeData. The snap protocol can be used to implement the "fast sync" algorithm, though it is recommended to use it for "snap sync".

Backwards Compatibility

This DIP changes the usds protocol and requires rolling out a new version, usds/67. Supporting multiple versions of a wire protocol is possible. Rolling out a new version does not break older clients immediately, since they can keep using protocol version usds/66.

This DIP does not change consensus rules of the DVM and does not require a hard fork.

Security Considerations

None

© 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.