Not logged in

Version 0.5.6-20180208.

net2o separates data and commands. Data is pass through to higher layers, commands are interpreted when they arrive. For connection requests, a special bit is set, and the address then isn't used as address, but as IV for the opportunistic encoding.

The command interpreter is a stack machine with two data types: 64 bit integers and strings (floats are also suppored, but used infrequently). Encoding of commands, integers and string length follows protobuf conceptually (but MSB first, not LSB first as with protobuf, to simplify scanning), strings are just sequences of bytes (interpretation can vary). Command blocks contain a sequence of commands; there are no conditionals and looping instructions.

Strings can contain encrypted nested commands, used during communication setup.

List of Commands

Commands are context-sensitive in an OOP method hierarchy sense.

base commands

reply commands

connection generic commands

connection setup commands

connection commands

file commands

ack commands

log commands

key storage commands

address commands

dht commands

vault commands

message commands

messaging commands

DVCS patch commands

DVCS metadata is stored in messages, containing message text, refs and patchset objects. Patchset objects are constructed in a way that makes identical transactions have the same hash.

payment commands


Contracts are now extremely simple: They just sign the sources and sinks provided. Every source needs a contract signature by the source owner. All sources and sinks are signed by the contracts in order, including the additional contracts. Since all sources, sinks and previous contracts are signed, too, hashes are only computed of the signatures (64 bytes), making the hashing easier. Contract validity is expressed by the start and end date of the contract signature. Example for an exchange bid: “I offer 20 USD and want to receive 5 $cams on my account” (with the $cam as traditional deflationary CryptoCurrency used for speculation only). The contract is only valid, if the source USD account is present, and someone added another source to allow those 5 $scams to be deduced from, and a sink to move those 20 USD to. All contracts are execute-once, since their sources must exist and will be replaced by the sinks on execution, and all contracts have implicit asset transfers by mandating sinks. If you want to implement more complex contracts, use intents: The intent is for incomplete transactions, which are completed by a contract signature; this contract signature may evaluate other conditions.