-
Notifications
You must be signed in to change notification settings - Fork 31
Running large block size simulation
This simulation is for testing large (>1 mb) block sizes. By default btcd nodes accept a block of maximum size 999000B. We need to use a fork a btcwire with updated MaxBlockPayload to handle larger blocks:
https://github.com/tuxcanfly/btcwire/tree/maxblocksize
There are two ways to do this:
cd $GOPATH/src/github.com/conformal/btcwire/
... directly edit msgblock.go line 24:
-const MaxBlockPayload = 1000000 // Not actually 1MB which would be 1024 * 1024
+const MaxBlockPayload = 32 * 1000000 // Not actually 1MB which would be 1024 * 1024
... or if you prefer, use this branch:
cd $GOPATH/src/github.com/conformal/btcwire
git remote add tuxcanfly https://github.com/tuxcanfly/btcwire
git fetch tuxcanfly
git checkout maxblocksize
You'll need to re-install dependents of btcwire again, so you can do this:
go install -v all
To test, check that btcd accepts the updated param max for -blockmaxsize:
btcd --simnet -u rpcuser -P rpcpass --blockmaxsize=31999000
If it starts btcd, you're good to go, but if you see this message, you're missing the updated maximum block size:
loadConfig: The blockmaxsize option must be in between 1000 and 999000 -- parsed [31999000]
Use btcd -h to show usage
The default CSV is meant for simulating normal block sizes. For large block sizes, download this file and save it to a CSV: http://sprunge.us/ZTIi
Now you should be able to launch btcsim with the new maximum block size and use the new CSV for input:
btcsim -maxblocksize=31999000 -txcurve=/home/tuxcanfly/Downloads/large.csv