Coder Social home page Coder Social logo

btcd's Introduction

btcd

Build Status

btcd is an alternative full node bitcoin implementation written in Go (golang).

This project is currently under active development and is in a Beta state. It is extremely stable and has been in production use since October 2013.

It properly downloads, validates, and serves the block chain using the exact rules (including consensus bugs) for block acceptance as Bitcoin Core. We have taken great care to avoid btcd causing a fork to the block chain. It includes a full block validation testing framework which contains all of the 'official' block acceptance tests (and some additional ones) that is run on every pull request to help ensure it properly follows consensus. Also, it passes all of the JSON test data in the Bitcoin Core code.

It also properly relays newly mined blocks, maintains a transaction pool, and relays individual transactions that have not yet made it into a block. It ensures all individual transactions admitted to the pool follow the rules required by the block chain and also includes more strict checks which filter transactions based on miner requirements ("standard" transactions).

One key difference between btcd and Bitcoin Core is that btcd does NOT include wallet functionality and this was a very intentional design decision. See the blog entry here for more details. This means you can't actually make or receive payments directly with btcd. That functionality is provided by the btcwallet and Paymetheus (Windows-only) projects which are both under active development.

Requirements

Go 1.8 or newer.

Installation

Windows - MSI Available

https://github.com/roasbeef/btcd/releases

Linux/BSD/MacOSX/POSIX - Build from Source

  • Install Go according to the installation instructions here: http://golang.org/doc/install

  • Ensure Go was installed properly and is a supported version:

$ go version
$ go env GOROOT GOPATH

NOTE: The GOROOT and GOPATH above must not be the same path. It is recommended that GOPATH is set to a directory in your home directory such as ~/goprojects to avoid write permission issues. It is also recommended to add $GOPATH/bin to your PATH at this point.

  • Run the following commands to obtain btcd, all dependencies, and install it:
$ go get -u github.com/Masterminds/glide
$ git clone https://github.com/roasbeef/btcd $GOPATH/src/github.com/roasbeef/btcd
$ cd $GOPATH/src/github.com/roasbeef/btcd
$ glide install
$ go install . ./cmd/...
  • btcd (and utilities) will now be installed in $GOPATH/bin. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Updating

Windows

Install a newer MSI

Linux/BSD/MacOSX/POSIX - Build from Source

  • Run the following commands to update btcd, all dependencies, and install it:
$ cd $GOPATH/src/github.com/roasbeef/btcd
$ git pull && glide install
$ go install . ./cmd/...

Getting Started

btcd has several configuration options avilable to tweak how it runs, but all of the basic operations described in the intro section work with zero configuration.

Windows (Installed from MSI)

Launch btcd from your Start menu.

Linux/BSD/POSIX/Source

$ ./btcd

IRC

  • irc.freenode.net
  • channel #btcd
  • webchat

Issue Tracker

The integrated github issue tracker is used for this project.

Documentation

The documentation is a work-in-progress. It is located in the docs folder.

GPG Verification Key

All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from the btcsuite developers. To verify the signature perform the following:

License

btcd is licensed under the copyfree ISC License.

btcd's People

Contributors

0xmichalis avatar aakselrod avatar alexbosworth avatar dajohi avatar dan-da avatar danielkrawisz avatar davecgh avatar dirbaio avatar drahn avatar dskloetg avatar flammit avatar halseth avatar jcvernaleo avatar jimmysong avatar jongillham avatar jrick avatar marcopeereboom avatar martelletto avatar mischief avatar owainga avatar roasbeef avatar runeaune avatar stevenroose avatar tb00 avatar toddfries avatar tsenart avatar tuxcanfly avatar waldyrious avatar wallclockbuilder avatar ysangkok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btcd's Issues

starting btcd causes panic

When I try to start btcd, I get following output:

2018-03-18 12:48:51.356 [INF] BTCD: Version 0.12.0-beta
2018-03-18 12:48:51.368 [INF] BTCD: Loading block database from '/crypto/btc-data/testnet/blocks_ffldb'
2018-03-18 12:48:51.425 [INF] BTCD: Block database loaded
2018-03-18 12:48:51.428 [INF] INDX: cf index is enabled
2018-03-18 12:48:51.429 [INF] CHAN: Loading block index.  This might take a while...
2018-03-18 12:48:51.567 [INF] BTCD: Gracefully shutting down the database...
2018-03-18 12:48:51.567 [INF] BTCD: Shutdown complete
panic: runtime error: slice bounds out of range [recovered]
	panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/roasbeef/btcd/database/ffldb.rollbackOnPanic(0xc4201c4240)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1889 +0x77
panic(0x99e4e0, 0xeb00e0)
	/usr/local/go/src/runtime/panic.go:505 +0x229
github.com/roasbeef/btcd/database/ffldb.(*transaction).FetchBlockHeader(0xc4201c4240, 0xc4200226c0, 0x89a0650, 0x20, 0xc420022280, 0xc4200200e0, 0xc4200226c0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1278 +0x2bc
github.com/roasbeef/btcd/blockchain.dbFetchHeaderByHash(0xbff0a0, 0xc4201c4240, 0xc4200226c0, 0xc4200226c0, 0x0, 0x0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/blockchain/chainio.go:1231 +0x3f
github.com/roasbeef/btcd/blockchain.dbFetchHeaderByHeight(0xbff0a0, 0xc4201c4240, 0x0, 0xc421938000, 0x13a933, 0x13a933)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/blockchain/chainio.go:1253 +0x8f
github.com/roasbeef/btcd/blockchain.(*BlockChain).initChainState.func1(0xbff0a0, 0xc4201c4240, 0xc4201c4240, 0x0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/blockchain/chainio.go:1159 +0x37d
github.com/roasbeef/btcd/database/ffldb.(*db).View(0xc4200aa440, 0xc4204ea340, 0x0, 0x0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1912 +0x9b
github.com/roasbeef/btcd/blockchain.(*BlockChain).initChainState(0xc4204d1200, 0xc4204d1200, 0xc42022f728)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/blockchain/chainio.go:1134 +0x99
github.com/roasbeef/btcd/blockchain.New(0xc4201f8310, 0xc4201f8310, 0xb, 0x0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/blockchain/chain.go:1600 +0x528
main.newServer(0xc420097350, 0x1, 0x1, 0xbfbb40, 0xc4200aa440, 0xeb9300, 0xc42008c120, 0xc4204ea680, 0xc4204ea660, 0xc4200970c0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/server.go:2412 +0x8d9
main.btcdMain(0x0, 0x0, 0x0)
	/home/mike/projects/go/src/github.com/roasbeef/btcd/btcd.go:148 +0x686
main.main()
	/home/mike/projects/go/src/github.com/roasbeef/btcd/btcd.go:330 +0xd0

When I use btcd from btcsuite, I don't get this error and node starts normally.

go version go1.10 linux/amd64

btcd testnet panics on start

While following the instructions, i get the following error while running btcd testnet.

btcd --testnet --txindex --rpcuser=cbarraford --rpcpass=<password>                                                  2 ↵  02:16  12:17:43
2018-07-04 12:18:33.074 [INF] BTCD: Version 0.12.0-beta
2018-07-04 12:18:33.075 [INF] BTCD: Loading block database from '/Users/cbarraford/Library/Application Support/Btcd/data/testnet/blocks_ffldb'
2018-07-04 12:18:33.107 [INF] BCDB: Detected unclean shutdown - Repairing...
2018-07-04 12:18:33.109 [INF] BCDB: Database sync complete
2018-07-04 12:18:33.109 [INF] BTCD: Block database loaded
2018-07-04 12:18:33.117 [INF] INDX: Transaction index is enabled
2018-07-04 12:18:33.117 [INF] INDX: cf index is enabled
2018-07-04 12:18:33.117 [INF] CHAN: Loading block index.  This might take a while...
2018-07-04 12:19:31.147 [INF] CHAN: Chain state (height 1126006, hash 0000000000032fb64bbd363ad62c9c8819187956ce851b755b3de8c39e2b8812, totaltx 13928880, work 671665688970348490798)
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on 127.0.0.1:18334
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on [::1]:18334
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on [fe80::1%lo0]:18334
2018-07-04 12:19:31.178 [INF] AMGR: Loaded 3262 addresses from file '/Users/cbarraford/Library/Application Support/Btcd/data/testnet/peers.json'
2018-07-04 12:19:31.179 [INF] CMGR: Server listening on [::]:18333
2018-07-04 12:19:31.180 [INF] CMGR: Server listening on 0.0.0.0:18333
2018-07-04 12:19:31.185 [INF] CMGR: 36 addresses found from DNS seed testnet-seed.bitcoin.jonasschnelli.ch
2018-07-04 12:19:31.185 [INF] CMGR: 38 addresses found from DNS seed seed.tbtc.petertodd.org
2018-07-04 12:19:31.266 [INF] CMGR: 3 addresses found from DNS seed testnet-seed.bluematt.me
2018-07-04 12:19:31.511 [INF] SYNC: New valid peer 93.190.142.127:18333 (outbound) (/Satoshi:0.15.0/)
2018-07-04 12:19:31.511 [INF] SYNC: Syncing to block height 1350093 from peer 93.190.142.127:18333
2018-07-04 12:19:31.528 [INF] SYNC: New valid peer 34.252.91.57:18333 (outbound) (/Satoshi:0.16.0/)
2018-07-04 12:19:31.563 [INF] SYNC: New valid peer 217.16.185.175:18333 (outbound) (/Satoshi:0.15.0.1/)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x1383503]

goroutine 53 [running]:
github.com/roasbeef/btcd/database/ffldb.rollbackOnPanic(0xc4292a41b0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1889 +0x77
panic(0x159cae0, 0x1ab1040)
	/usr/local/Cellar/go/1.10.3/libexec/src/runtime/panic.go:502 +0x229
github.com/roasbeef/btcd/blockchain/indexers.dbStoreFilterIdxEntry(0x17fdd00, 0xc4292a41b0, 0x1a81d90, 0x10, 0x10, 0xc43942bb00, 0xc4396fe360, 0x20, 0x20, 0x0, ...)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:71 +0xb3
github.com/roasbeef/btcd/blockchain/indexers.storeFilter(0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc4325a5ef0, 0x0, 0x24, 0xc42e243170)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:171 +0x2b1
github.com/roasbeef/btcd/blockchain/indexers.(*CfIndex).ConnectBlock(0xc42013c820, 0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc431204cc0, 0xc439329d00, 0x112e76)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:212 +0x76
github.com/roasbeef/btcd/blockchain/indexers.dbIndexConnectBlock(0x17fdd00, 0xc4292a41b0, 0x17fb900, 0xc42013c820, 0xc42b8b64d0, 0xc431204cc0, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/manager.go:87 +0x128
github.com/roasbeef/btcd/blockchain/indexers.(*Manager).ConnectBlock(0xc420144690, 0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc431204cc0, 0xc1, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/manager.go:535 +0xa0
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBlock.func1(0x17fdd00, 0xc4292a41b0, 0xc4292a41b0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:647 +0x1d6
github.com/roasbeef/btcd/database/ffldb.(*db).Update(0xc4201362c0, 0xc438cba640, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1946 +0x9b
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBlock(0xc420067380, 0xc42bfce230, 0xc42b8b64d0, 0xc431204cc0, 0xc4202e6a00, 0xc1, 0xc1, 0x0, 0x3d00000000000003)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:614 +0x2f8
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBestChain(0xc420067380, 0xc42bfce230, 0xc42b8b64d0, 0xc400000000, 0x0, 0x0, 0xc4329fbad8)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:1072 +0x1de
github.com/roasbeef/btcd/blockchain.(*BlockChain).maybeAcceptBlock(0xc420067380, 0xc42b8b64d0, 0x0, 0x0, 0x0, 0x1ac5a20)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/accept.go:78 +0x21b
github.com/roasbeef/btcd/blockchain.(*BlockChain).ProcessBlock(0xc420067380, 0xc42b8b64d0, 0xc400000000, 0xc432b90000, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/process.go:228 +0x2b5
github.com/roasbeef/btcd/netsync.(*SyncManager).handleBlockMsg(0xc42016a370, 0xc42e45d200)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:569 +0x205
github.com/roasbeef/btcd/netsync.(*SyncManager).blockHandler(0xc42016a370)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:1152 +0x548
created by github.com/roasbeef/btcd/netsync.(*SyncManager).Start
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:1374 +0xe3

Build failure with latest master

After the glide install I tried go install and go build, they both failed with:

./server.go:1388: undefined: time.Until

Are any dependencies missing?

Edit: I'm running go version go1.6.2 linux/amd64 if that matters.

roasbeef/btcd does not start with chain data created by btcsuite/btcd

Background
I'm trying to setup LND for mainnet. For that I setup a btcd server. By mistake I used btcsuite/btcd to download the blockchain.
To use it with LND I setup roasbeef/btcd using the data directory created by btcsuite/btcd. I was expected that it will work without any problem.
However, when I start roasbeef/btcd it fails with the following:

2018-04-07 23:19:36.566 [INF] BTCD: Version 0.12.0-beta
2018-04-07 23:19:36.602 [INF] BTCD: Loading block database from '/Users/admin/Library/Application Support/Btcd/data/mainnet/blocks_ffldb'
2018-04-07 23:19:37.366 [INF] BTCD: Block database loaded
2018-04-07 23:19:37.376 [INF] INDX: cf index is enabled
2018-04-07 23:19:37.377 [INF] CHAN: Loading block index. This might take a while...
2018-04-07 23:19:37.486 [INF] BTCD: Gracefully shutting down the database...
2018-04-07 23:19:37.487 [INF] BTCD: Shutdown complete
panic: runtime error: slice bounds out of range [recovered]
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/roasbeef/btcd/database/ffldb.rollbackOnPanic(0xc4201b4120)
/Users/admin/gocode/src/github.com/roasbeef/btcd/database/ffldb/db.go:1889 +0x77
panic(0x159e840, 0x1ab3070)
/usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
github.com/roasbeef/btcd/database/ffldb.(*transaction).FetchBlockHeader(0xc4201b4120, 0xc420150160, 0x373a7f0, 0x20, 0xc420150140, 0xc420154080, 0xc420150160)
/Users/admin/gocode/src/github.com/roasbeef/btcd/database/ffldb/db.go:1278 +0x2bc
github.com/roasbeef/btcd/blockchain.dbFetchHeaderByHash(0x17ff6c0, 0xc4201b4120, 0xc420150160, 0xc420150160, 0x0, 0x0)
/Users/admin/gocode/src/github.com/roasbeef/btcd/blockchain/chainio.go:1231 +0x3f
github.com/roasbeef/btcd/blockchain.dbFetchHeaderByHeight(0x17ff6c0, 0xc4201b4120, 0x0, 0xc422470000, 0x7e3c9, 0x7e3c9)
/Users/admin/gocode/src/github.com/roasbeef/btcd/blockchain/chainio.go:1253 +0x8f
github.com/roasbeef/btcd/blockchain.(*BlockChain).initChainState.func1(0x17ff6c0, 0xc4201b4120, 0xc4201b4120, 0x0)
/Users/admin/gocode/src/github.com/roasbeef/btcd/blockchain/chainio.go:1159 +0x37d
github.com/roasbeef/btcd/database/ffldb.(*db).View(0xc42002e700, 0xc42015e220, 0x0, 0x0)
/Users/admin/gocode/src/github.com/roasbeef/btcd/database/ffldb/db.go:1912 +0x9b
github.com/roasbeef/btcd/blockchain.(*BlockChain).initChainState(0xc4204f4f00, 0xc4204f4f00, 0xc420571728)
/Users/admin/gocode/src/github.com/roasbeef/btcd/blockchain/chainio.go:1134 +0x99
github.com/roasbeef/btcd/blockchain.New(0xc42050a310, 0xc42050a310, 0x12, 0x0)
/Users/admin/gocode/src/github.com/roasbeef/btcd/blockchain/chain.go:1600 +0x528
main.newServer(0xc42014a190, 0x1, 0x1, 0x17fc0e0, 0xc42002e700, 0x1abbd20, 0xc42009a120, 0xc42015e600, 0xc42015e5e0, 0xc420152650)
/Users/admin/gocode/src/github.com/roasbeef/btcd/server.go:2412 +0x8d9
main.btcdMain(0x0, 0x0, 0x0)
/Users/admin/gocode/src/github.com/roasbeef/btcd/btcd.go:148 +0x686
main.main()
/Users/admin/gocode/src/github.com/roasbeef/btcd/btcd.go:330 +0xd0

Process finished with exit code 2

Your environment
Running on Darwin admins-MacBook-Pro-2.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
btcd version 0.12.0-beta

Steps to reproduce
Very easy for me to reproduce. Just start btcd.
If I use btcsuite/btcd it will start successfully.

Expected behaviour
Should start without errors

Actual behaviour
See above.

From debugging:
When loading block index at chainio.go
calling dbFetchHeaderByHeight with height=0 (first block)
getting correct has for height =0
calling dbFetchHeaderByHash with hash
calling FetchBlockHeader with hash
calling fetchBlockRow with hash
getting a blockrow from hash table using the Hash

               returned blockrow has length of 12 which is causing a failure at db.go:1278

msi for windows install

Hello all ,
Can you point me to a valid windows msi file ...
It seems to be missing from the releases.

btcd.conf file not automatically created for simnet

I run btcd --simnet --txindex --rpcuser=kek --rpcpass=kek which should create a default btcd.conf, as I understand from the installation instructions. However, when I run btcctl --simnet --rpcuser=kek --rpcpass=kek getinfo after that, I get the following error:

Error creating a default config file: open /home/ubuntu/.btcd/btcd.conf: no such file or directory

the output is:

{
"version": 120000,
"protocolversion": 70002,
"blocks": 0,
"timeoffset": 0,
"connections": 0,
"proxy": "",
"difficulty": 1,
"testnet": false,
"relayfee": 0.00001,
"errors": ""
}

What am I supposed to make out of this? Is this an issue?

Consider moving to lightningnetwork/btcd

Hello!

Would you consider moving this repository to lightningnetwork/lnd and advertise it as an officially maintained fork?

This would probably attract a portion of the btcsuite/btcd community.

If you are a member of the lightningnetwork github page, you should be able to transfer the repository and GitHub will automatically setup a redirect. This means that go get github.com/Roasbeef/btcd will still work as long as you don't re-create a Roasbeef/btcd repository. Then you can start modifying the import paths, but there will be no rush to do so.

Example of a repository that was renamed and is still go-get-able at the old address:

  • github.com/aviau/go-get-rename-test

Unable to checkout golang.org/x/crypto

glide install
[INFO]	--> Fetching golang.org/x/crypto
[WARN]	Unable to checkout golang.org/x/crypto
[ERROR]	Update failed for golang.org/x/crypto: Cannot detect VCS
[ERROR]	Failed to install: Cannot detect VCS

Tried on ubuntu 16.04 with go 1.10, any idea on how to solve this? Can't install btcd at the moment

Why does btcd keep stalling while syncing the chain?

Yesterday I noticed btcd stalled for two and half hours, I had to manually restart it. Now looking at the log screen I saw the timeline had a gap that showed btcd stalled for about 4 hours before progressed again. Here's my log:

2018-05-07 00:56:52.947 [INF] SYNC: Lost peer 107.189.42.203:8333 (outbound)
2018-05-07 00:56:53.615 [INF] SYNC: New valid peer 119.28.187.169:8333 (outbound) (/Satoshi:0.16.0/)
2018-05-07 05:03:12.740 [ERR] PEER: Can't read message from 209.159.151.144:8333 (outbound): read tcp 195.181.243.196:55570->209.159.151.144:8333: read: connection reset by peer
2018-05-07 05:03:12.740 [INF] SYNC: Lost peer 209.159.151.144:8333 (outbound)
2018-05-07 05:03:23.252 [INF] SYNC: New valid peer [2001:0:4137:9e76:4d7:37bd:bbc4:bf8]:8333 (outbound) (/Satoshi:0.15.1/)```

EDIT:  It's hanging again right now...  

2018-05-07 07:27:09.808 [INF] SYNC: Syncing to block height 521602 from peer [2a00:1a48:7810:101:be76:4eff:fe08:c774]:8333
2018-05-07 07:27:09.808 [INF] SYNC: Downloading headers for blocks 355822 to 382320 from peer [2a00:1a48:7810:101:be76:4eff:fe08:c774]:8333
2018-05-07 07:27:13.815 [INF] SYNC: Verified downloaded block header against checkpoint at height 382320/hash 00000000000000000a8dc6ed5b133d0eb2fd6af56203e4159789b092defd8ab2
2018-05-07 07:27:13.816 [INF] SYNC: Received 26499 block headers: Fetching blocks
2018-05-07 07:27:39.886 [INF] SYNC: New valid peer [2001:718:ff01:2:0:93ff:fefb:fdf8]:8333 (outbound) (/Satoshi:0.12.1(bitcore)/)

SYNC: Failed to process block

I'm syncing btcd on Ubuntu 18.04 LTS 4.15.0-20-generic.

I'm using the command ~$ go/bin/btcd --testnet --txindex
I see btcd crashing repeatedly with the following errors:

2018-05-15 21:38:52.345 [ERR] SYNC: Failed to process block 0000000000000789d01477f37ef86ffec951d0ca2192d761a5068878610e8649: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb] panic: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb]

2018-05-15 21:45:18.267 [ERR] SYNC: Failed to process block 00000000000cae5e5b78982e6eb20532ce3bdf41f4df1580f628d9c9c03b9844: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb] panic: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb]

2018-05-15 21:52:53.502 [ERR] SYNC: Failed to process block 00000000000003805e0815351d0181e6495047379b2748f8f6697c2b8ea512a7: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb] panic: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb]

2018-05-15 21:58:41.809 [ERR] SYNC: Failed to process block 0000000000000789d01477f37ef86ffec951d0ca2192d761a5068878610e8649: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb] panic: failed to open ldb transaction: leveldb/table: corruption on data-block (pos=1827711): checksum mismatch, want=0x15ca319f got=0x4df6a1cc [file=094552.ldb]

Also part of the error log:

goroutine 39 [running]: github.com/roasbeef/btcd/netsync.(*SyncManager).handleBlockMsg(0xc4200f04d0, 0xc43e261960) /home/loysan/go/src/github.com/roasbeef/btcd/netsync/manager.go:584 +0x1430 github.com/roasbeef/btcd/netsync.(*SyncManager).blockHandler(0xc4200f04d0) /home/loysan/go/src/github.com/roasbeef/btcd/netsync/manager.go:1152 +0x548 created by github.com/roasbeef/btcd/netsync.(*SyncManager).Start /home/loysan/go/src/github.com/roasbeef/btcd/netsync/manager.go:1374 +0xe3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.