Skip to content

Commit f26d523

Browse files
authored
Merge pull request #15 from DeckerSU/static-experimental
Komodo-Qt (KomodoOcean) [Draconic Serpent]
2 parents fde3004 + 0b4e4cd commit f26d523

File tree

151 files changed

+1902
-396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1902
-396
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ brew install protobuf
6262
brew install coreutils
6363
brew install wget
6464
# Clone the Komodo repo
65-
git clone https://github.com/DeckerSU/KomodoOcean --branch statoc --single-branch
65+
git clone https://github.com/DeckerSU/KomodoOcean --branch static --single-branch
6666
# Change master branch to other branch you wish to compile
6767
cd komodo
6868
./zcutil/fetch-params.sh

contrib/linearize/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Linearize
2+
Construct a linear, no-fork, best version of the Komodo (or smartchain) blockchain.
3+
4+
## Step 1: Download hash list
5+
6+
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
7+
8+
Required configuration file settings for linearize-hashes:
9+
* RPC: `datadir` (Required if `rpcuser` and `rpcpassword` are not specified)
10+
* RPC: `rpcuser`, `rpcpassword` (Required if `datadir` is not specified)
11+
12+
Optional config file setting for linearize-hashes:
13+
* RPC: `host` (Default: `127.0.0.1`)
14+
* RPC: `port` (Default: `7771`)
15+
* Blockchain: `min_height`, `max_height`
16+
* `rev_hash_bytes`: If true, the written block hash list will be
17+
byte-reversed. (In other words, the hash returned by getblockhash will have its
18+
bytes reversed.) False by default. Intended for generation of
19+
standalone hash lists but safe to use with linearize-data.py, which will output
20+
the same data no matter which byte format is chosen.
21+
22+
The `linearize-hashes` script requires a connection, local or remote, to a
23+
JSON-RPC server. Running `komodod` or `komodo-qt -server` will be sufficient.
24+
25+
## Step 2: Copy local block data
26+
27+
$ ./linearize-data.py linearize.cfg
28+
29+
Required configuration file settings:
30+
* `output_file`: The file that will contain the final blockchain.
31+
or
32+
* `output`: Output directory for linearized `blocks/blkNNNNN.dat` output.
33+
34+
Optional config file setting for linearize-data:
35+
* `debug_output`: Some printouts may not always be desired. If true, such output
36+
will be printed.
37+
* `file_timestamp`: Set each file's last-accessed and last-modified times,
38+
respectively, to the current time and to the timestamp of the most recent block
39+
written to the script's blockchain.
40+
* `genesis`: The hash of the genesis block in the blockchain.
41+
* `input`: komodod blocks/ directory containing blkNNNNN.dat
42+
* `hashlist`: text file containing list of block hashes created by
43+
linearize-hashes.py.
44+
* `max_out_sz`: Maximum size for files created by the `output_file` option.
45+
(Default: `1000*1000*1000 bytes`)
46+
* `netmagic`: Network magic number.
47+
* `out_of_order_cache_sz`: If out-of-order blocks are being read, the block can
48+
be written to a cache so that the blockchain doesn't have to be sought again.
49+
This option specifies the cache size. (Default: `100*1000*1000 bytes`)
50+
* `rev_hash_bytes`: If true, the block hash list written by linearize-hashes.py
51+
will be byte-reversed when read by linearize-data.py. See the linearize-hashes
52+
entry for more information.
53+
* `split_timestamp`: Split blockchain files when a new month is first seen, in
54+
addition to reaching a maximum file size (`max_out_sz`).
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# bitcoind RPC settings (linearize-hashes)
2+
rpcuser=bitcoin
3+
rpcpassword=local321
4+
datadir=~/.komodo
5+
host=127.0.0.1
6+
7+
#mainnet default
8+
port=7771
9+
10+
#testnet default
11+
#port=18332
12+
13+
#regtest default
14+
#port=18443
15+
16+
# bootstrap.dat hashlist settings (linearize-hashes)
17+
max_height=1844224
18+
19+
# bootstrap.dat input/output settings (linearize-data)
20+
21+
# mainnet
22+
netmagic=f9eee48d
23+
genesis=027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71
24+
input=/home/decker/.komodo/blocks
25+
26+
# testnet
27+
#netmagic=0b110907
28+
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
29+
#input=/home/example/.bitcoin/testnet3/blocks
30+
31+
# regtest
32+
#netmagic=fabfb5da
33+
#genesis=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
34+
#input=/home/example/.bitcoin/regtest/blocks
35+
36+
# "output" option causes blockchain files to be written to the given location,
37+
# with "output_file" ignored. If not used, "output_file" is used instead.
38+
# output=/home/example/blockchain_directory
39+
output_file=/home/decker/bootstrap.dat
40+
hashlist=hashlist.txt
41+
42+
# Maximum size in bytes of out-of-order blocks cache in memory
43+
out_of_order_cache_sz = 100000000
44+
45+
# Do we want the reverse the hash bytes coming from getblockhash?
46+
rev_hash_bytes = False
47+
48+
# On a new month, do we want to set the access and modify times of the new
49+
# blockchain file?
50+
file_timestamp = 0
51+
# Do we want to split the blockchain files given a new month or specific height?
52+
split_timestamp = 0
53+
54+
# Do we want debug printouts?
55+
debug_output = False

0 commit comments

Comments
 (0)