#nano #cryptocurrency #decentralized #task-list

bin+lib feeless

A Nano (cryptocurrency) node and utilities such as nano addresses, hashing blocks, signing, etc

12 releases

0.1.11 Mar 29, 2021
0.1.10 Mar 28, 2021
0.1.3 Feb 15, 2021

#18 in #task-list

29 downloads per month

MIT/Apache

345KB
7.5K SLoC

⋰·⋰ Feeless

Crates.io docs.rs GitHub last commit MIT OR Apache-2.0 Licence

What is Feeless?

Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate. This is not the official project for Nano, only an implementation written in Rust. The official Nano node implementation lives here.

🚸 This is a work in progress. The API will probably change without notice until v0.2. 🚸

I decided to start this project as a personal adventure of understanding Nano. I give no promises about my future motivation to complete this project 🤐.

Documentation

Please visit the documentation website for general information, features, installation, CLI usage and more.

https://feeless.dev/

What is Nano?

Nano is digital money that significantly improves on Bitcoin and other cryptocurrencies.

The main features of Nano are:

  • No transaction fees.

  • Extremely fast to send money—less than 1 second for 100% confirmation.

    Bitcoin takes 10 minutes on average for ~80%1 confirmation. Nano is more asynchronous than Bitcoin—individual transactions are voted on separately from the rest of the network.
  • Highly decentralized.

    Using the Nakamoto coefficient measurement, it is more decentralized than Bitcoin2 3.

  • No inflation.

  • Green—Massively less energy use than Bitcoin.

For more information on what Nano is, see the Nano documentation: https://docs.nano.org/what-is-nano/overview/

Nano is also known as: Nano cryptocurrency, Nano coin, RaiBlocks.

1. The Bitcoin white paper, under section 11 "Calculations" explains there's a ~80% chance for an attacker with 10% mining power to overtake the longest chain. https://bitcoin.org/bitcoin.pdf 2. Measuring Decentralization in Bitcoin and Ethereum using Multiple Metrics and Granularities https://arxiv.org/pdf/2101.10699.pdf 3. List of representative nodes showing a Nakamoto coefficient of 8 at the time of writing (2021-02) https://nanocharts.info/

Task list

A medium term task list:

  • Seeds
    • Mnemonic (word list) seed generation/parsing (BIP39)
    • Derive keys from mnemonic (BIP33)
    • Hex seeds
  • Keys (ed25519/blake2b)
    • Private keys
    • Public keys
    • Nano addresses
      • Validation
      • Parsing
      • Conversion to/from public keys
  • Nano amount conversions
    • raw
    • nano
    • Mnano/NANO
  • Proof of work (core)
    • Verification against a threshold
    • Generation
    • Dynamic threshold
  • Blocks
    • Hashing
    • Work
    • State blocks
    • <v18 blocks
  • Packet dissector
    • Parse pcap file
    • Dump some message types to console
    • Mark this done when all packets are decoded successfully (see below)
  • Node
    • Configuration
      • Initial command line interface
      • Network
      • Database
      • ...
    • Networks
      • Live (Don't worry, I'm only connecting to my own node at the moment!)
      • Test
      • Beta
    • Bootstrap peer connection (peering.nano.org)
    • Validate given peer network
    • Validate given peer versions
    • Multiple peer connectivity (currently only connects to one peer)
      • Configurable maximum peer limit
    • Header parsing
      • Network
      • Versions
      • Extensions
        • Handshake query/response flags
        • Count
        • Block type
        • Telemetry size
        • Extended params present
    • Logic
      • Rebroadcasting
      • Representatives
      • Publish retries (difficulty changes)
      • Respond to telemetry request
      • ...
    • Messages
      • Node ID Handshake
        • Serialize (TODO: needs small refactor)
        • Deserialize
        • Send cookie
        • Cookie/peer store and logic
        • Validate response
        • Validate signature
      • Confirm Req
        • Serialize
        • Deserialize
          • Hash pairs
          • Block selector
        • Handle response
      • Confirm Ack
        • Serialize
        • Deserialize
          • Vote by hash
          • Block
        • Validate signature
      • Keepalive
        • Serialize
        • Deserialize
      • Publish
        • Serialize
        • Deserialize
          • State blocks
          • Other blocks
      • Bulk pull
      • Bulk pull account
      • Bulk pull blocks
      • Bulk push
      • Telemetry Req
        • Serialize
        • Deserialize
      • Telemetry Ack
        • Serialize
        • Deserialize
          • Most fields
          • Timestamp
          • Active difficulty
        • Validate signature
      • Frontier Req
        • Serialize
        • Deserialize
    • Storage
      • Basic KV store to file
      • Basic cookie/peer storage
      • Peers
      • Blocks
      • ...
    • RPC
  • Rust
    • Ask around for a code review
    • Use either zerocopy or make all core types zero-copy with storing [u8] and methods as accessors. zerocopy did work for most things when I tried but had problems with enums. Might revisit.
    • Use thiserror instead of anyhow in certain places.
    • Github actions CI (including cargo clippy)
  • Future things
    • Fast bootstrapping related to the user's wallet
    • Performance
      • Automated comparison
    • Proof of work
      • Server
      • GPU
    • WASM

Credits and references

Other implementations

License

Licensed under either of these at your option:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~14–25MB
~375K SLoC