Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sugarchain: add: bootstrap block height at 2601001 #49

Merged
merged 8 commits into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions contrib/linearize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Construct a linear, no-fork, best version of the Bitcoin blockchain. The scripts
run using Python 3 but are compatible with Python 2.

## Warning
Do not use `-txindex=1` in this script.

## Stop 0: Fix `max_height` in `linearize.cfg`

## Step 1: Download hash list

$ ./linearize-hashes.py linearize.cfg > hashlist.txt
Expand Down Expand Up @@ -32,10 +37,10 @@ JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient.

$ head -1 hashlist.txt # genesis
7d5eaec2dbb75f99feadfa524c78b7cabc1d8c8204f79d4f3a83381b811b0adc
$ wc -l hashlist.txt # 650000+1 (add genesis)
650001 hashlist.txt
$ tail -n 1 hashlist.txt # height 650000 # getblockhash 650000
e5728ed52ccc5b2f1261f377e810b98c007cdbe09507b6e4aa4c2d81eb4199af
$ wc -l hashlist.txt # 2601001+1 (add genesis)
2601002 hashlist.txt
$ tail -n 1 hashlist.txt # height 2601001 # getblockhash 2601001
56e8f536feb26f749ed9198f56f397da08f018de9518674b2ac12a41061612cb

## Step 2: Copy local block data

Expand Down
5 changes: 3 additions & 2 deletions contrib/linearize/linearize.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ port=34229
#port=45339

# bootstrap.dat hashlist settings (linearize-hashes)
# at this moment, the height is approx. 1821672
max_height=1820701
# at this moment, the height is approx. 2825602 (2020-02-03)
# 510*(510*10)+1
max_height=2601001

# bootstrap.dat input/output settings (linearize-data)

Expand Down