op return – What are the imply, median, vary, limits and developments within the dimension of coinbase transactions?

0
141
op return – What are the imply, median, vary, limits and developments within the dimension of coinbase transactions?


A. Is there a restrict within the general dimension of the coinbase tx?

I assumed the restrict for coinbase was the identical as the overall restrict for transactions.

What’s the most dimension of a transaction?

However as Murch famous:

coinbase transactions aren’t topic to mempool insurance policies and standardness guidelines, as a result of they aren’t relayed on the community outdoors of the context of being included in blocks. Subsequently, they’re solely restricted by the blockweight restrict as an alternative of the load restrict of 400,000 wu for normal transactions.

n.b. What number of weight models does an enter use?


B. Is there a restrict to the variety of OP_RETURN statements within the coinbase transaction?

As far as I do know, you’ll be able to solely have one OP_RETURN in anybody Bitcoin script, any following information just isn’t parsed.

Like all transaction, a Coinbase transaction can have many outputs, though just one enter. So it might have quite a few OP_RETURNs.

As Pieter Wuille famous:

There will be a number of OP_RETURN opcodes inside a transaction output too. The standard standardness guidelines about OP_RETURN outputs require the opcode to be the primary script byte, however once more as a result of standardness guidelines do not apply to coinbase transactions, that does not matter.

It’s in all probability price saying that scripts in coinbase inputs ought to by no means get executed, though the primary opcode ought to push the block peak. Apart from that, their contents will be thought-about as arbitrary byte information which could comprise the worth 0x6A (OP_RETURN) a number of occasions.


C. What’s the imply, median, vary and common development within the dimension of coinbase transactions

You possibly can work this out in the event you acquire information utilizing a full node corresponding to Bitcoin core. See

You possibly can write your individual analytic device utilizing a blockchain parser. I wrote my very own parser library (unpublished) which may very well be used as follows

bundle foremost

import (
    bc "blockchain/blockchain"
    "fmt"
    "os"
    "time"
)

func foremost() {
    b, err := os.ReadFile(`blk02000.dat`)
    examine("Studying information", err)

    parser := bc.New(BlockHandler)
    err = parser.ParseBlocks(&b)
    examine("Parsing information", err)
}

// Extract size of coinbase transactions 
var i int = 1
func BlockHandler(b *bc.Block) {
    blockDate := time.Unix(int64(b.Header.TimeStamp), 0).Format("2006-01-02 15:04")
    coinbase :=  b.TransactionList[0]
    txBytes := coinbase.Measurement()
    fmt.Printf("Block %5d dated %s has coinbase of %5d Bytesn",
        i, blockDate, txBytes) 
    i++
}

// Rudimentary comfort perform for error dealing with
func examine(the place string, err error) {
    if err != nil {
        fmt.Println(the place, err)
        os.Exit(1)
    }
}

outcomes

Block     1 dated 2020-03-14 06:24 has coinbase of   300 Bytes
Block     2 dated 2020-03-14 14:20 has coinbase of   300 Bytes
Block     3 dated 2020-03-14 08:42 has coinbase of   246 Bytes
Block     4 dated 2020-03-13 23:08 has coinbase of   300 Bytes
Block     5 dated 2020-03-14 04:19 has coinbase of   306 Bytes
Block     6 dated 2020-03-14 15:47 has coinbase of   295 Bytes
Block     7 dated 2020-03-13 14:39 has coinbase of   216 Bytes
Block     8 dated 2020-03-14 13:04 has coinbase of   362 Bytes
Block     9 dated 2020-03-14 09:31 has coinbase of   308 Bytes
Block    10 dated 2020-03-14 10:16 has coinbase of   306 Bytes
Block    11 dated 2020-03-14 15:39 has coinbase of   346 Bytes
Block    12 dated 2020-03-14 08:05 has coinbase of   377 Bytes
Block    13 dated 2020-03-14 13:48 has coinbase of   362 Bytes
Block    14 dated 2020-03-14 17:15 has coinbase of   299 Bytes
Block    15 dated 2020-03-14 06:18 has coinbase of   342 Bytes
Block    16 dated 2020-03-14 11:37 has coinbase of   377 Bytes
Block    17 dated 2020-03-14 12:35 has coinbase of   377 Bytes
Block    18 dated 2020-03-14 17:32 has coinbase of   377 Bytes
Block    19 dated 2020-03-14 13:22 has coinbase of   316 Bytes
Block    20 dated 2020-03-14 18:37 has coinbase of   291 Bytes
Block    21 dated 2020-03-14 15:10 has coinbase of   377 Bytes
Block    22 dated 2020-03-14 09:35 has coinbase of   362 Bytes
Block    23 dated 2020-03-14 12:58 has coinbase of   295 Bytes
Block    24 dated 2020-03-14 06:37 has coinbase of   317 Bytes
Block    25 dated 2020-03-14 18:46 has coinbase of   299 Bytes
Block    26 dated 2020-03-13 23:12 has coinbase of   298 Bytes
Block    27 dated 2020-03-14 16:27 has coinbase of   362 Bytes
Block    28 dated 2020-03-14 16:53 has coinbase of   377 Bytes
Block    29 dated 2020-03-14 19:04 has coinbase of   217 Bytes
Block    30 dated 2020-03-14 07:26 has coinbase of   342 Bytes
Block    31 dated 2020-03-14 13:42 has coinbase of   289 Bytes
Block    32 dated 2020-03-14 20:10 has coinbase of   295 Bytes
Block    33 dated 2020-03-14 12:32 has coinbase of   295 Bytes
Block    34 dated 2020-03-13 08:50 has coinbase of   342 Bytes
Block    35 dated 2020-03-14 18:07 has coinbase of   308 Bytes
Block    36 dated 2020-03-14 16:59 has coinbase of   263 Bytes
Block    37 dated 2020-03-14 21:43 has coinbase of   296 Bytes
Block    38 dated 2020-03-14 20:27 has coinbase of   377 Bytes
Block    39 dated 2020-03-14 18:33 has coinbase of   289 Bytes
Block    40 dated 2020-03-14 18:15 has coinbase of   290 Bytes
Block    41 dated 2020-03-14 23:05 has coinbase of   362 Bytes
Block    42 dated 2020-03-13 16:19 has coinbase of   377 Bytes
Block    43 dated 2020-03-14 13:48 has coinbase of   263 Bytes
Block    44 dated 2020-03-14 09:30 has coinbase of   308 Bytes
Block    45 dated 2020-03-14 20:07 has coinbase of   316 Bytes
Block    46 dated 2020-03-15 01:10 has coinbase of   289 Bytes
Block    47 dated 2020-03-14 19:19 has coinbase of   362 Bytes
Block    48 dated 2020-03-14 19:51 has coinbase of   300 Bytes
Block    49 dated 2020-03-14 22:40 has coinbase of   377 Bytes
Block    50 dated 2020-03-15 02:16 has coinbase of   296 Bytes
Block    51 dated 2020-03-14 21:43 has coinbase of   217 Bytes
Block    52 dated 2020-03-14 15:43 has coinbase of   308 Bytes
Block    53 dated 2020-03-14 22:42 has coinbase of   306 Bytes
Block    54 dated 2020-03-14 20:45 has coinbase of   306 Bytes
Block    55 dated 2020-03-14 12:13 has coinbase of   296 Bytes
Block    56 dated 2020-03-15 04:06 has coinbase of   342 Bytes
Block    57 dated 2020-03-15 01:09 has coinbase of   285 Bytes
Block    58 dated 2020-03-15 05:13 has coinbase of   299 Bytes
Block    59 dated 2020-03-15 00:31 has coinbase of   289 Bytes
Block    60 dated 2020-03-14 17:39 has coinbase of   308 Bytes
Block    61 dated 2020-03-15 01:12 has coinbase of   290 Bytes
Block    62 dated 2020-03-14 22:31 has coinbase of   299 Bytes
Block    63 dated 2020-03-15 08:39 has coinbase of   362 Bytes
Block    64 dated 2020-03-14 13:30 has coinbase of   295 Bytes
Block    65 dated 2020-03-15 01:45 has coinbase of   377 Bytes
Block    66 dated 2020-03-15 02:08 has coinbase of   311 Bytes
Block    67 dated 2020-03-15 03:10 has coinbase of   377 Bytes
Block    68 dated 2020-03-14 19:02 has coinbase of   290 Bytes
Block    69 dated 2020-03-15 01:31 has coinbase of   377 Bytes
Block    70 dated 2020-03-15 03:41 has coinbase of   377 Bytes
Block    71 dated 2020-03-15 09:34 has coinbase of   342 Bytes
Block    72 dated 2020-03-15 03:25 has coinbase of   285 Bytes
Block    73 dated 2020-03-14 16:20 has coinbase of   261 Bytes
Block    74 dated 2020-03-14 21:04 has coinbase of   298 Bytes
Block    75 dated 2020-03-15 04:01 has coinbase of   362 Bytes
Block    76 dated 2020-03-15 05:09 has coinbase of   377 Bytes
Block    77 dated 2020-03-15 04:32 has coinbase of   296 Bytes
Block    78 dated 2020-03-15 05:59 has coinbase of   289 Bytes
Block    79 dated 2020-03-15 03:24 has coinbase of   362 Bytes
Block    80 dated 2020-03-15 05:22 has coinbase of   377 Bytes
Block    81 dated 2020-03-14 18:40 has coinbase of   313 Bytes
Block    82 dated 2020-03-13 17:48 has coinbase of   298 Bytes
Block    83 dated 2020-03-15 10:38 has coinbase of   316 Bytes
Block    84 dated 2020-03-15 06:46 has coinbase of   362 Bytes
Block    85 dated 2020-03-15 06:28 has coinbase of   342 Bytes
Block    86 dated 2020-03-13 10:28 has coinbase of   306 Bytes
Block    87 dated 2020-03-15 06:41 has coinbase of   362 Bytes
Block    88 dated 2020-03-14 23:00 has coinbase of   306 Bytes
Block    89 dated 2020-03-15 04:09 has coinbase of   339 Bytes
Block    90 dated 2020-03-14 21:11 has coinbase of   295 Bytes
Block    91 dated 2020-03-15 11:18 has coinbase of   266 Bytes
Block    92 dated 2020-03-15 09:37 has coinbase of   306 Bytes
Block    93 dated 2020-03-15 09:07 has coinbase of   296 Bytes
Block    94 dated 2020-03-15 11:51 has coinbase of   299 Bytes
Block    95 dated 2020-03-15 09:26 has coinbase of   306 Bytes
Block    96 dated 2020-03-15 02:03 has coinbase of   289 Bytes
Block    97 dated 2020-03-15 12:26 has coinbase of   263 Bytes
Block    98 dated 2020-03-14 23:34 has coinbase of   377 Bytes
Block    99 dated 2020-03-15 10:32 has coinbase of   342 Bytes
Block   100 dated 2020-03-15 11:35 has coinbase of   342 Bytes
Block   101 dated 2020-03-15 10:51 has coinbase of   291 Bytes
Block   102 dated 2020-03-15 10:18 has coinbase of   377 Bytes
Block   103 dated 2020-03-15 05:58 has coinbase of   299 Bytes
Block   104 dated 2020-03-15 11:57 has coinbase of   306 Bytes
Block   105 dated 2020-03-15 13:38 has coinbase of   377 Bytes
Block   106 dated 2020-03-15 03:58 has coinbase of   298 Bytes
Block   107 dated 2020-03-15 02:17 has coinbase of   306 Bytes
Block   108 dated 2020-03-15 05:25 has coinbase of   296 Bytes
Block   109 dated 2020-03-15 06:43 has coinbase of   299 Bytes
Block   110 dated 2020-03-15 10:41 has coinbase of   342 Bytes
Block   111 dated 2020-03-15 12:15 has coinbase of   300 Bytes
Block   112 dated 2020-03-15 11:54 has coinbase of   299 Bytes

Clearly its a small step from that to build up min, max, median values by 12 months. Or simply feed that information into another device.

LEAVE A REPLY

Please enter your comment!
Please enter your name here