Bitcoin Forum
May 06, 2024, 09:08:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Limitless Storage-less Spent Output Accumulator using MMR  (Read 111 times)
spartacusrex (OP)
Hero Member
*****
Offline Offline

Activity: 718
Merit: 545



View Profile
July 12, 2018, 10:37:51 AM
Last edit: July 12, 2018, 09:34:21 PM by spartacusrex
 #1

Peter Todd's MMR ( https://petertodd.org/2016/delayed-txo-commitments ) allows near limitless storage of values in a merkle hash tree.

In SQL terms. you get INSERT and UPDATE. but no SELECT or DELETE. You must keep track of the MMR proofs, that show your entry is valid ( your version of SELECT).

Keeping track of spent outputs normally involves storing the outputs in an ever growing un-pruneable accumulator. ZCash is the most prominent coin that uses something like this.

-------------------------------

I present a way of checking whether a special value is valid as it has never been used.


1) The user creates a public/private key.

2) User sends a special transaction to the network, which includes his public key, requesting a value/address.

3) The network adds that transaction to a block, and then creates an value/address that is equal to Hash ( Public Key | Block Hash | Transaction_num_in_block ).

4) The network adds this Globally Unique address to the MMR, and it is currently unused. Every entry into this MMR is always unique.

5) When the user wishes to use this value (could be an output), he provides the MMR proof and a signature for the original Public key (using his private key), and the MMR is then updated to show that this value is used ( output is spent ).  

6) You will NEVER get 2 MMR values with the same value, so once you have used it, you can never re-use it, and all you can do is request another value/address, which will always be different. You can't add the same value again.


That's it. You only need to store the MMR, and you can use that to make sure no one ever uses the same address/value twice.

[edit]
To be more informative - An MMR Database is 1 32 byte hash. They are very tiny.

( ..and at most to initialise an MMR you need the tree peaks, which for 2256 values is 8K )

Life is Code.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!