Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

blockchain: scalable state proposal #249

@oleganza

Description

@oleganza

Per discussion in #230, here's a concrete proposal for addressing scalability of the blockchain state:

  • Core node contains "trimmed state" of log₂(utxos) size via utreexo protocol. If it has its own utxos, it needs to track updates to the state and adjust its merkle proofs for its utxos. This means, that all devices w/o bandwidth constraints have low storage overhead and can use core nodes for all their blockchain needs (wallets, issuers, exchanges, point-of-sale terminals, payment processors etc).
  • Thick node encapsulates Core node and stores the full UTXO state and allows non-nodes to simply keep their utxos: then it will provide up-to-date proofs or insert them on the fly.
  • Core nodes can maintain proofs for N most recent utxos so that other nodes can avoid sending the proofs for them. This dramatically improves bandwidth as nodes only need to transmit proofs for older UTXO that are pruned from such limited buffer. N can be chosen on per-connection basis.
  • There are no nonces to store. For non-replayability, every transaction must spend a utxo.
  • Instruction nonce can be removed.
  • To enable issuance of custom assets, blocks mint synthetic nonce-units abbreviated as nits. These can be given away to anyone who needs to issue assets, so they can make their txs non-replayable.
  • Nits are minted at a pre-determinate and capped schedule in order to avoid u64 overflow like for any other assets. Every block is permitted to add an artificial nits-containing utxo to the state with arbitrary predicate, pre-determinate quantity, zero flavor and anchor set to the previous block ID.
  • Minted utxos are remembered with a 48h expiration time in a separate maturity buffer and checked for attempted spending before the maturity time. This is to incentivize placing transactions in a continuous chain of blocks.
  • SPV clients can subscribe to Core nodes to track utxo proofs for them, and receive up-to-date proofs on continuous basis, so they can (1) detect misbehavior early and switch to a different Core node; (2) watch payment channel status and detect forced settlements to be able to contest invalid settlements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions