Raw Transaction Comparing to Bitcoin

It’s not easy to directly dump a raw transaction data from MWC explorer, because input/s and output/s are unlinkable in block/s of Mimblewimble.

Here for the easy life of comparing a typical 1 input 2 outputs transaction between MWC and other coins, let’s paste an example here. This raw transaction data is captured from network in one node server.

0d4d0f000000000000065eb1de7c0981e5fa500db7588c2d66eb8c26366e0ccc1e14128e6e5e60e78003a20000000000000001000000000000000200000000000000010109e3b92af99424942820c1b174cc90da99e8ad98f58b260a6c8d4ba8559af136eb00088cc7deae322b1e59321b7d5892224420c499d01942f06388c3d3cefc7baf0f9e00000000000002a3b3100b0cf190b3c1952957756691597e88b61d14b3ae81d434fb03e43e7dbdbac855d566531d5153dcbf61cc2752a411519b24f797f54d238808b93baca3eee00d3cecfa586bb72ce43b9dadbec445111ef381e31a9f73a17f061c651a6f6571614cc3b2818103a57d153f00e74c44456b59246c3f45bfba4ece50df7618bdcabcdeaada80d5e56ca750e843060341faa71c4c3f0bf5704085d17ecd62f445c6df5b9eb6960d0a534f1075082ecacca9d3ee3094263682804eedc67e87aa4a0c6525f3552d10be0b0bd294670654d69b629a2274e46c01ac6682eebe3c6b1c0e5594f291cd20006342acb89fef34acc0ac98654d411f113ea13a1b669e12fe98692d765ab42c71b999305dcddcb23fa0d7c8c5a856ed4b238dbc5a5b454e8a651cbb77398a8fbe3e27ed075dbe9487fe90059fa04a9f3d45a52e024a57275f48d26d363dae02c3103caa59098c4fad1029a76915e771d5223d4ed509b6cc7319475402f987629f5be7957b2c474aca6c8e8e2f9b133498f4d3bcccc83ef5c7ab8e392c92483eca349fa471adf0c5e0c93fbbe424e3b8492f3dc26d3fbc8bbbf28466965508800f6812e8b693daf2548f55314d982c705fde588bc1d1a920352e45ee0f62aaca8283d4cd51217f3408ed44d6c569beb0634452af24b0f96ed26b24696d0b4ed1c47e6efbd9690d2f32b9b97d7227c83adf8c7de3911f890e961adb39276d168a79f50cf005d6ab9e976a2d19a1cea798ff3f5c578868d5f75a4a8d98f567269af171890b4b6792646c17440f2ba51e6128acb49c301f962fd22f1dc0e83a3918fdea0e46d4bce9b4cb378093dc32e9156e4fefcb788abc02cbe9870b22c5864d865b07d4c9645188e00af0b73506487874f99c594df522438a978563355a7733e108a400f50573630aebe7408da2a50d401d753ac45b1d199444e4272b00093df2bac0c49ebc339e5ed3afb1668fa28d973a3af95a9f277040609752e2ab5a00000000000002a3d95013597b36cf598f55e104fd0d195adf6e70b5949398d01a0ca7c24400f1a3a87bc1442c73972889c1c9dfd44376aa99cc3679be060f47e35ea5e4a9b2f93b026b842df6e32927a5f0b5239e445a72f63650ea2d41963c9d0654cca4f6a11a7f50e86839087d0ddd6d529b8bbbd245456ef2cd65707e4e44bf363898413301e20d617e9562d54b917d7340550dfcb302785b2aa8b62ed11ec67e63252de2e566ce3cf9affc9c9bd75ab1fdb9c465572b147a112f29e7af65ab8fde542c70a7ea1acbb12ec9f0f5bb6221ae39722702a4b31887b93041b0ce7ce453a852e06ec7ee2cdb2b0dedbac7b72c26978a7f1af729ac5a87b69bce43774c8cd16a53d0fbb52569416937a72ae97c3abe4225d75f2409b2e70b40d104388c8d8870233f3b8ef75ca94aeff7393a7ca7f31886074e82611fcd1532d2cf493aae3727fb127886ee265982ca1cba889828e000416a54b93112091c7056e3ff6244e119104a0ffc00b0c88f06c6d5d0e8429220fed5bb24d0c49d506709f4210a4393ba7686525218cca4619838f153bc839237811d05f10af0cbf1265e1c387415bd0a0cd44b94c19448e62ef4f55ed6854fb341cc6887bb4ff1f033e82a727d12303a5b77ff0b75b39f7ad0bd572d2c66c66570fcc0482af9bb48e4c25d14b6a455eb21195915d686987f08c61c2f2120a3aabf9e701da9a87e305d8cd4c17a2a4506ff47d81a09ef8efc0f0e9472ddeedcd3f6d2e6f6304a55b0d40d28c455f551b203aa11fa8f9a817ebea4f75dd2200c176ca134e218726e328e72b3a57d00332b4c8f771b5ce898a767267af1e360e8d66389e8eb30364202bced9a559f5267e0531f48b66fe35f39c69293ec5f7c8ab36ef8d6b44bbf80147b3828c7f9e28db3684452afe3ff862a88711f9b53484a589054425d34119667e8219b25028def153062484e410000000000007a120009a1ff8dc26ac8e26a968e2f0383d174df0575300f4f39a2c27881b90af7c41ead4cd508ae5d6da69fca8f23bd3e732b1e7a7a464fc922b5a84f2604f15decdfd8c89fdbab9e1b0983c7c0ebbdb40790b0220189890319449727781eb3b7f56968

The total size of this broadcasted raw transaction data is 1641 bytes, including the p2p protocol header which is 11 bytes. The inner real raw transaction payload is 1630 bytes.

The decoded raw transaction data in Json format is:

{
    "offset": "b1de7c0981e5fa500db7588c2d66eb8c26366e0ccc1e14128e6e5e60e78003a2",
    "body": {
      "inputs": [
        {
          "features": "Coinbase",
          "commit": "09e3b92af99424942820c1b174cc90da99e8ad98f58b260a6c8d4ba8559af136eb"
        }
      ],
      "outputs": [
        {
          "features": "Plain",
          "commit": "088cc7deae322b1e59321b7d5892224420c499d01942f06388c3d3cefc7baf0f9e",
          "proof": "b3100b0cf190b3c1952957756691597e88b61d14b3ae81d434fb03e43e7dbdbac855d566531d5153dcbf61cc2752a411519b24f797f54d238808b93baca3eee00d3cecfa586bb72ce43b9dadbec445111ef381e31a9f73a17f061c651a6f6571614cc3b2818103a57d153f00e74c44456b59246c3f45bfba4ece50df7618bdcabcdeaada80d5e56ca750e843060341faa71c4c3f0bf5704085d17ecd62f445c6df5b9eb6960d0a534f1075082ecacca9d3ee3094263682804eedc67e87aa4a0c6525f3552d10be0b0bd294670654d69b629a2274e46c01ac6682eebe3c6b1c0e5594f291cd20006342acb89fef34acc0ac98654d411f113ea13a1b669e12fe98692d765ab42c71b999305dcddcb23fa0d7c8c5a856ed4b238dbc5a5b454e8a651cbb77398a8fbe3e27ed075dbe9487fe90059fa04a9f3d45a52e024a57275f48d26d363dae02c3103caa59098c4fad1029a76915e771d5223d4ed509b6cc7319475402f987629f5be7957b2c474aca6c8e8e2f9b133498f4d3bcccc83ef5c7ab8e392c92483eca349fa471adf0c5e0c93fbbe424e3b8492f3dc26d3fbc8bbbf28466965508800f6812e8b693daf2548f55314d982c705fde588bc1d1a920352e45ee0f62aaca8283d4cd51217f3408ed44d6c569beb0634452af24b0f96ed26b24696d0b4ed1c47e6efbd9690d2f32b9b97d7227c83adf8c7de3911f890e961adb39276d168a79f50cf005d6ab9e976a2d19a1cea798ff3f5c578868d5f75a4a8d98f567269af171890b4b6792646c17440f2ba51e6128acb49c301f962fd22f1dc0e83a3918fdea0e46d4bce9b4cb378093dc32e9156e4fefcb788abc02cbe9870b22c5864d865b07d4c9645188e00af0b73506487874f99c594df522438a978563355a7733e108a400f50573630aebe7408da2a50d401d753ac45b1d199444e4272b"
        },
        {
          "features": "Plain",
          "commit": "093df2bac0c49ebc339e5ed3afb1668fa28d973a3af95a9f277040609752e2ab5a",
          "proof": "d95013597b36cf598f55e104fd0d195adf6e70b5949398d01a0ca7c24400f1a3a87bc1442c73972889c1c9dfd44376aa99cc3679be060f47e35ea5e4a9b2f93b026b842df6e32927a5f0b5239e445a72f63650ea2d41963c9d0654cca4f6a11a7f50e86839087d0ddd6d529b8bbbd245456ef2cd65707e4e44bf363898413301e20d617e9562d54b917d7340550dfcb302785b2aa8b62ed11ec67e63252de2e566ce3cf9affc9c9bd75ab1fdb9c465572b147a112f29e7af65ab8fde542c70a7ea1acbb12ec9f0f5bb6221ae39722702a4b31887b93041b0ce7ce453a852e06ec7ee2cdb2b0dedbac7b72c26978a7f1af729ac5a87b69bce43774c8cd16a53d0fbb52569416937a72ae97c3abe4225d75f2409b2e70b40d104388c8d8870233f3b8ef75ca94aeff7393a7ca7f31886074e82611fcd1532d2cf493aae3727fb127886ee265982ca1cba889828e000416a54b93112091c7056e3ff6244e119104a0ffc00b0c88f06c6d5d0e8429220fed5bb24d0c49d506709f4210a4393ba7686525218cca4619838f153bc839237811d05f10af0cbf1265e1c387415bd0a0cd44b94c19448e62ef4f55ed6854fb341cc6887bb4ff1f033e82a727d12303a5b77ff0b75b39f7ad0bd572d2c66c66570fcc0482af9bb48e4c25d14b6a455eb21195915d686987f08c61c2f2120a3aabf9e701da9a87e305d8cd4c17a2a4506ff47d81a09ef8efc0f0e9472ddeedcd3f6d2e6f6304a55b0d40d28c455f551b203aa11fa8f9a817ebea4f75dd2200c176ca134e218726e328e72b3a57d00332b4c8f771b5ce898a767267af1e360e8d66389e8eb30364202bced9a559f5267e0531f48b66fe35f39c69293ec5f7c8ab36ef8d6b44bbf80147b3828c7f9e28db3684452afe3ff862a88711f9b53484a589054425d34119667e8219b25028def153062484e41"
        }
      ],
      "kernels": [
        {
          "features": "Plain",
          "fee": "8000000",
          "lock_height": "0",
          "excess": "09a1ff8dc26ac8e26a968e2f0383d174df0575300f4f39a2c27881b90af7c41ead",
          "excess_sig": "d8dfec5df104264fa8b522c94f467a7a1e2b733ebd238fca9fa66d5dae08d54c6869f5b7b31e78279744190389890122b09007b4bdebc0c783091b9eabdb9fc8"
        }
      ]
    }
  }

This transaction is packed into block #530522.

A typical bitcoin 1i2o transaction

For example here, this bitcoin transaction has size of 223 bytes. The raw data is:

0200000001a8a82279ca0002c915ff1c905b4f66bffd1a252267c83bd354b4958af7241f48010000006b483045022100b48ab148644eddc2f0124b6c51e9668ca9453eb2e579c8f7aed4431b5e56f91b02203529cc329ab0f8768b36869bf451e6e96dcd789d02aaecdc70c1f64a30868696012103a02e93cf8c47b250075b0af61f96ebd10376c0aaa7635148e889cb2b51c96927ffffffff02a22a190000000000160014e6ad69aec5a11f57786da05f35000f73375fa9b0803931d7b60100001976a9145faa9576e45acbc9662b6abf323229b748a9495d88ac00000000

The decoded raw transaction in Json:

{
  "txid": "2bb78473a61c1b5ed7049acba1f15d563c54ed72da0c616205a56dd6235eb4ad",
  "hash": "2bb78473a61c1b5ed7049acba1f15d563c54ed72da0c616205a56dd6235eb4ad",
  "version": 2,
  "size": 223,
  "vsize": 223,
  "weight": 892,
  "locktime": 0,
  "vin": [
    {
      "txid": "481f24f78a95b454d33bc86722251afdbf664f5b901cff15c90200ca7922a8a8",
      "vout": 1,
      "scriptSig": {
        "asm": "3045022100b48ab148644eddc2f0124b6c51e9668ca9453eb2e579c8f7aed4431b5e56f91b02203529cc329ab0f8768b36869bf451e6e96dcd789d02aaecdc70c1f64a30868696[ALL] 03a02e93cf8c47b250075b0af61f96ebd10376c0aaa7635148e889cb2b51c96927",
        "hex": "483045022100b48ab148644eddc2f0124b6c51e9668ca9453eb2e579c8f7aed4431b5e56f91b02203529cc329ab0f8768b36869bf451e6e96dcd789d02aaecdc70c1f64a30868696012103a02e93cf8c47b250075b0af61f96ebd10376c0aaa7635148e889cb2b51c96927"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.01649314,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 e6ad69aec5a11f57786da05f35000f73375fa9b0",
        "hex": "0014e6ad69aec5a11f57786da05f35000f73375fa9b0",
        "reqSigs": 1,
        "type": "witness_v0_keyhash",
        "addresses": [
          "bc1qu6kkntk95y04w7rd5p0n2qq0wvm4l2dsf2e6p3"
        ]
      }
    },
    {
      "value": 18848.06003072,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 5faa9576e45acbc9662b6abf323229b748a9495d OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a9145faa9576e45acbc9662b6abf323229b748a9495d88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "19iqYbeATe4RxghQZJnYVFU4mjUUu76EA6"
        ]
      }
    }
  ]
}

So if the MWC transaction is 1641 bytes and the BTC transaction is 223 bytes, where do the MW space savings occur?

I’m asking out of genuine curiosity and to learn how the MW blockchain works.

On the surface, 1641 vs 223 seems a losing but actually not, that’s the cost we have to pay for privacy. The heaviest part of a Mimblewimble transaction payload is the Bulletproof, which is 83% in that 1641. The other remaining part is just 275 bytes including the 32-bytes offset which is not packed directly into the block.

Mimblewimble has great improvement on blockchain scalability, the space savings mainly occur in chain state database, which only need all UTXO(Unspent Transaction Output) set. To achieve that, Mimblewimble use so-called cut-through to process all transactions, from the current block through all the way down to the first block, removing all spent outputs from the chain state database.

With a proper good design of a Mimblewimble wallet, theoretically a Mimblewimble chain state database size only depends on the number of wallet users, not depends on the transaction volume.

In contrast, Bitcoin (actually all non-mimblewimble chain) keeps all transaction data as the chain state database, so as to recursively validate the transaction input/output up to the coinbase output.

To get an intuitive view here for the gap of the cumulative transactions number and the total UTXO number, I take 2 Bitcoin charts from https://www.blockchain.com/charts here, we can see that is about a difference between 600M vs 60M at this time.

4 Likes