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

Add decred support #216

Merged
merged 9 commits into from
Jul 7, 2019
Merged

Add decred support #216

merged 9 commits into from
Jul 7, 2019

Conversation

dmigwi
Copy link
Contributor

@dmigwi dmigwi commented Jun 27, 2019

All the major issues are fixed apart from a tiny issue resulting from how decred's (Proof of stake) P.O.S. works. Blocks in decred's block chain are validated or invalidated by the consecutive block mined. We therefore implemented a hack that only allows syncing of blocks with at least one confirming block so as to only push blocks which have been validated to the blockbook's db.

The major concern has been referenced here: #213 (comment)

The decred's best block (doesn't have a confirming block thus can't be synced) txs are listed together with other mempool txs in the mempool page. All the data for this block's txs in the mempool is correct apart from from the block height and the block hash field.

Possible ways to fix this could be:

  1. Offer a way to clear txs in an invalidated block as described here: Purge Blocks to a specific height #213 (comment)
  2. The fields BlockHeight and BlockHash could be added to Tx struct and before executing this code those two fields provided could be used instead if not empty.

@martinboehm
Copy link
Contributor

Hi, when building decred blockbook, I got the following error:

bchain/coins/dcr/decredparser.go:14:2: cannot find package "github.com/decred/dcrd/chaincfg"

Please add your Gopkg.toml/lock to the PR.

Gopkg.lock Outdated Show resolved Hide resolved
@martinboehm
Copy link
Contributor

I am afraid that you took out too much :) Now I get

vendor/github.com/decred/dcrd/dcrec/edwards/ecdsa.go:17:2: cannot find package "github.com/agl/ed25519" in any of:
	/go/src/blockbook/vendor/github.com/agl/ed25519 (vendor tree)
	/opt/go/src/github.com/agl/ed25519 (from $GOROOT)
	/go/src/github.com/agl/ed25519 (from $GOPATH)
vendor/github.com/decred/dcrd/dcrec/edwards/const.go:10:2: cannot find package "github.com/agl/ed25519/edwards25519" in any of:
	/go/src/blockbook/vendor/github.com/agl/ed25519/edwards25519 (vendor tree)
	/opt/go/src/github.com/agl/ed25519/edwards25519 (from $GOROOT)
	/go/src/github.com/agl/ed25519/edwards25519 (from $GOPATH)
vendor/github.com/decred/dcrd/chaincfg/chainhash/hashfuncs.go:9:2: cannot find package "github.com/dchest/blake256" in any of:
	/go/src/blockbook/vendor/github.com/dchest/blake256 (vendor tree)
	/opt/go/src/github.com/dchest/blake256 (from $GOROOT)
	/go/src/github.com/dchest/blake256 (from $GOPATH)

@dmigwi
Copy link
Contributor Author

dmigwi commented Jul 2, 2019

@martinboehm Sorry about that please check it again now. Kindly let me know when we can discuss the issue highlighted in this PR's description.

@martinboehm martinboehm merged commit 91691ed into trezor:master Jul 7, 2019
bidoudan pushed a commit to stibits-inc/blockbook that referenced this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants