Cesar Rodas 67549e2f07 tiny ledger 4 hónapja
..
src 67549e2f07 tiny ledger 4 hónapja
Cargo.toml 67549e2f07 tiny ledger 4 hónapja
README.md 67549e2f07 tiny ledger 4 hónapja

README.md

TinyLedger

TinyLedger is a lightweight and efficient ledger database designed for storing financial transactions. Utilizing the Unspent Transaction Output (UTXO) data model ensures security and simplicity similar to Bitcoin.

Unspent Transaction Output (UTXO)

In TinyLedger, account balances are represented by a collection of received payments that have not been spent (unspent outputs).

Key Features:

  • Atomic Transactions: Every transaction in TinyLedger comprises a set of inputs (received payments to be spent) and outputs (new payments created).
  • Balanced Transactions: Transactions must be balanced, meaning the total value of inputs must equal the total value of outputs, ensuring no new assets are created arbitrarily.
  • Special Transactions: The balanced transaction rule has two exceptions: Deposits and Withdrawals. These special transactions allow for the purposeful creation or destruction of assets within the ledger.

Transactions

TinyLedger's UTXO model allows for the encapsulation of complex financial transactions within atomic operations. This capability enables secure and efficient execution of transactions involving multiple parties. For instance, when exchanging goods, TinyLedger ensures that all steps of the transaction are completed simultaneously and reliably, preventing partial completions and increasing overall transaction security.

Transaction Components

Transactions in TinyLedger are composed primarily of two components:

  1. Base Transaction: This is the read-only component that forms the foundation of the transaction. It contains the initial set of inputs and outputs.
  2. Revisions: Each transaction can have multiple revisions, which are strictly controlled updates to the transaction. These revisions can update specific attributes, such as the transaction status. Revisions ensure that all updates are consistent and adhere to predefined rules. Each revision is linked to the previous revision, guaranteeing a complete transaction history upon request.

Once a transaction is finalized, it is treated as either a success or a failure:

  • Successful Transactions: These transactions are completed and recorded permanently.
  • Failed Transactions: These transactions are not removed but are rolled back. They remain in the database forever, ensuring a complete historical record of all transaction attempts.

Data Integrity

To ensure data integrity, both transaction and revision IDs are secured by hashing. Any attempt to tamper with these IDs will result in checksum errors, further securing the data against unauthorized modifications.

Benefits:

  • Efficiency: Designed to handle financial transactions with minimal overhead.
  • Security: The UTXO model provides inherent security features, reducing the risk of double-spending and other common issues.
  • Flexibility: Supports complex multi-party transactions, ensuring all conditions are met before the transaction is finalized.

Getting Started

To get started with TinyLedger, check out the documentation for installation and usage instructions.

Contributing

We welcome contributions! Please see our contributing guide for more information on how to get involved.

License

TinyLedger is released under the MIT License.


For any questions or support, please reach out via [contact information or support link].


Feel free to improve this README further by tailoring it to your project's specifics and adding any additional sections you find necessary.