Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam committed Dec 14, 2023
1 parent 96aef0b commit ed6451c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions state-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ The state network uses the stock XOR distance metric defined in the portal wire

The derivation function for Content Id values are defined separately for each data type.

#### Path Aware Content ID Derivation

The state network is primarily concerned with storing state data which is cryptographically anchored into trie structure. A naive approach to distribution of this data in the network would be to address trie nodes by their node-hash. This approach is effective, however, it negatively impacts the efficiency of lookups. The production patricia merkle trie for ethereum accounts tends to be at least 7 layers deep, which in a production portal network environment would mean nodes would have to perform seven (7) recursive lookups in the DHT to find a single piece of state.

For this reason, the state network implements a custom scheme that uses the trie path for the high bits in the content-id and the low bits from the node hash for the remainder of the content-id. The result of this is ... TODO...

### Wire Protocol

#### Protocol Identifier
Expand Down

0 comments on commit ed6451c

Please sign in to comment.