chia-blockchain/src/consensus/constants.py

31 lines
7.5 KiB
Python

constants = {
"NUMBER_OF_HEADS": 3, # The number of tips each full node keeps track of and propagates
"DIFFICULTY_STARTING": 20, # These are in units of 2^32
"BLOCK_TIME_TARGET": 10, # The target number of seconds per block
"DIFFICULTY_FACTOR": 4, # The next difficulty is truncated to range [prev / FACTOR, prev * FACTOR]
# These 3 constants must be changed at the same time
"DIFFICULTY_EPOCH": 12, # The number of blocks per epoch
"DIFFICULTY_WARP_FACTOR": 4, # DELAY divides EPOCH in order to warp efficiently.
"DIFFICULTY_DELAY": 3, # EPOCH / WARP_FACTOR
"DISCRIMINANT_SIZE_BITS": 1024,
# The percentage of the difficulty target that the VDF must be run for, at a minimum
"MIN_BLOCK_TIME_PERCENT": 20,
"MIN_VDF_ITERATIONS": 1, # These are in units of 2^32
"MAX_FUTURE_TIME": 7200, # The next block can have a timestamp of at most these many seconds more
"NUMBER_OF_TIMESTAMPS": 11, # Than the average of the last NUMBEBR_OF_TIMESTAMPS blocks
# If an unfinished block is more than these many seconds slower than the best unfinished block,
# don't propagate it.
"PROPAGATION_THRESHOLD": 1800,
# If the expected time is more than these seconds, slightly delay the propagation of the unfinished
# block, to allow better leaders to be released first. This is a slow block.
"PROPAGATION_DELAY_THRESHOLD": 600,
# Hardcoded genesis block, generated using block tools
"GENESIS_BLOCK": b'\x15N3\xd3\xf9H\xc2K\x96\xfe\xf2f\xa2\xbf\x87\x0e\x0f,\xd0\xd4\x0f6s\xb1".\\\xf5\x8a\xb4\x03\x84\x8e\xf9\xbb\xa1\xca\xdef3:\xe4?\x0c\xe5\xc6\x12\x80\x16\xee\x03\x08\xb2\xb3 l\x95\x14\x1f\xcbx\xdd\x9b\xdd?\x05\xce\xd6T\xbf\xd1\xaf\xc1\xed\x87\x0c\xefk\xf4&\xb3L\xcb\\\x8bJ<S\tri\xad\xd3\x01\x7f\xca\x13\x00\x00\x00\x98\xcb\xe9\xc7Ei\x84u\x8c\x1cP\x1e\x85\x05\xb8\x9b\xee\xcd\xb3\xdajb\xff=z\x1cn\x932\x97\xff\x9e\xea@v"DV\x04cb\x9d\xd3\xee\x9eE\xdcP\xf8D\x8f|\x83B\x06`\x10\xa9\xa9^\xaf\xdb\xd8Via.\xfa\x00\xbe\xc5\xf7i\xce\ti\tBZZ\x83f\x08}\xcf\xb5\x91\xa8\xf7A\xc7.\xca\x9d0lYZ\xe9\x05\xa0~2\x18\xbc\x19\xf1w\xcf^\x96\xd1 \xf6\x18\x10\x05\x81\xfeiV\xd0\xb0\x80\x88\\\xc2\\\xf3\xcb\x9b\xf0\xc8\xfbh\x9e}H\xc1\xa3)\xff_\xf0jy\xafe\xf2\xf66N\xa3\x01\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x00\x00\x00\x00\x00\x00 a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00HC7R\xc6\x01T\xca\x1c*;I\x038\xd1\xce\x91\xd4=\x03\x979\xdfq\xe1\xca"i\xe2\xfbA\xe4\x89\xa6\xa3\xc9,\xeeH>\x10\x85\x1a\xb9\x8c\\\xfcr\x04\x1a\t\x98\x9f\xfc\'S\xef\x16J*\xd8F\xa1\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000~\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1\x11\x1f\x06e\x1apdi\xeb\t\x15:l\x02vO\x8eEw2,,\xcf\xf8:\nC\xf8\xf1\xbd\xff\xed\xd3\xc6F,\x0bD\x96\x98\xffv\xbf\xe7\n\xf8\x85\xf7s\xb5\xe0\xa4\x14\x86\x84(u\x8d)\xf9\x15d~]\xdc\xef\x8c\xfb\x83\x97UF\xc3[\xf2*OI\xb9[\xdbQ^\xa0\x7fQ\xa2\x19R~\xb1K9\x9eW\x00\x1fL\x00\xe6!\xba\x9d/l\xc3\xd9IS\xea\x1aF[\nL\xd9\xd8\xc8\x0e8\rA\xeci~j\x85\x0exG.\x00I\xe5n\xa2\xa1\xb38\x05)P\x19\xc0\x1c&_\x02\xc5z>5\xf2\xaa\\V\xe6\x1f\xe1\xf3\x00\x05\x00?\xaeo\xa2&I\x1e\xbc5\xd2?\xb8\xda\xec"8!]!uGV\x03\x8d\x1e\x1e\'\x10\x1cM\xcaq\xa7\x11(\xdc\x8a\xb0P\xa9\x05\x87\xef\rd/X\x7f>\x04\x08\x12\xd9R\xa2\xfdg\x87\x99.\xc3\xd9\x01\xcb\tN\x9d\x1dHq\x14\xe5m\xc1(U!NR\x8ev\xe8L\xfd\xe3Nbj\r\x91n\x1f\xc3\x8d\xa8\xda\x1b*e\x05L\x1ab\xde9aK\xf1E\xac\x80\xd6\x9f\x08\xf2;2\x18\xd2\x86\x17\\\xbdN\xc2x:\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00 a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00]\x9e\xad8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\tN\x9d\x1dHq\x14\xe5m\xc1(U!NR\x8ev\xe8L\xfd\xe3Nbj\r\x91n\x1f\xc3\x8d\xa8)\xed\xd8&\xa6\xf4\xf5}h,\x0ch\x95S\x12\x95\x0f\x9c\xac\xbebG\xde\xef\x81\xe0\xeczQ\xc5\xcfk\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00A\xbb\xe5S\xb3\xa9\x9b{\xcd]T\xa3p77\xc7\x96u\xa2l\xc6\x97\nn\xd4\xe8j70Z\x164\xe7\xa8i~\x9b\x9f\x9b(\x1b\x17\x83\xc9\xd4\xc1&\r\x00?iD\x03\xbb\xceGIT\x1d\xcf\x91$\x95\x1b\x92V=\x91\xc5\xa6\x14S\x0bdy\xbc\xf2\x86\xc7\x08\xda\x99\r\xff\xf4\xfe\xdf\xb7\xfc\xa6O\x1d\xbfP4\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x8b)\xaa\x96x8\xd76J\xa6\x8b[\x98\t\xe0\\\xe3^7qD\x8c\xf5q\x08\xf2\xa2\xc9\xb03mvU\x1a\xe2\x181\x88\xfe\t\x03?\x12\xadj\x9d\xe8K\xb8!\xee\xe7e8\x82\xfb$\xf0Y\xfaJ\x10\x1f\x1a\xe5\xe9\xa8\xbb\xea\x87\xfc\xb12y\x94\x8d,\x16\xe4C\x02\xba\xe6\xac\x94{\xc4c\x07(\xb8\xeb\xab\xe3\xcfy{6\x98\t\xf4\x8fm\xd62\x85\x87\xb0\x03f\x01B]\xe3\xc6\x13l6\x8d\x0e\x18\xc64%\x97\x1a\xa6\xf4\x8b)\xaa\x96x8\xd76J\xa6\x8b[\x98\t\xe0\\\xe3^7qD\x8c\xf5q\x08\xf2\xa2\xc9\xb03mv\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' # noqa: E501
}