Update references to forked btcd, btcutil and bchutil libraries

This commit is contained in:
Martin Boehm 2019-01-04 14:05:51 +01:00
commit 97e0844a4b
41 changed files with 168 additions and 99 deletions

14
Gopkg.lock generated
View File

@ -21,9 +21,9 @@
[[projects]]
branch = "master"
name = "github.com/btcsuite/btcd"
name = "github.com/martinboehm/btcd"
packages = ["blockchain","btcec","chaincfg","chaincfg/chainhash","database","txscript","wire"]
revision = "2be2f12b358dc57d70b8f501b00be450192efbc3"
revision = "8e7c0427fee5d4778c5d4eb987150369e3ca1d0e"
[[projects]]
branch = "master"
@ -33,7 +33,7 @@
[[projects]]
branch = "master"
name = "github.com/btcsuite/btcutil"
name = "github.com/martinboehm/btcutil"
packages = [".","base58","bech32"]
revision = "501929d3d046174c3d39f0ea54ece471aa17238c"
@ -93,15 +93,15 @@
[[projects]]
branch = "master"
name = "github.com/jakm/bchutil"
name = "github.com/martinboehm/bchutil"
packages = ["."]
revision = "5a273ca8a96628732c07ff5cfb9f3e7d965241e8"
revision = "6373f11b6efe1ea81e8713b8788a695b2c144d38"
[[projects]]
branch = "master"
name = "github.com/jakm/btcutil"
name = "github.com/martinboehm/btcutil"
packages = [".","base58","bech32","chaincfg","txscript"]
revision = "224b76333062172edefdeb502123fdda12205f76"
revision = "613fec26904062ae125fb073762af3a77c77b6c7"
[[projects]]
branch = "master"

View File

@ -27,11 +27,11 @@
[[constraint]]
branch = "master"
name = "github.com/btcsuite/btcd"
name = "github.com/martinboehm/btcd"
[[constraint]]
branch = "master"
name = "github.com/btcsuite/btcutil"
name = "github.com/martinboehm/btcutil"
[[constraint]]
branch = "master"

View File

@ -5,10 +5,10 @@ import (
"blockbook/bchain/coins/btc"
"fmt"
"github.com/jakm/bchutil"
"github.com/jakm/btcutil"
"github.com/jakm/btcutil/chaincfg"
"github.com/jakm/btcutil/txscript"
"github.com/martinboehm/bchutil"
"github.com/martinboehm/btcutil"
"github.com/martinboehm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/txscript"
"github.com/schancel/cashaddr-converter/address"
)

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -8,8 +8,8 @@ import (
"math/big"
"github.com/golang/glog"
"github.com/jakm/bchutil"
"github.com/juju/errors"
"github.com/martinboehm/bchutil"
)
// BCashRPC is an interface to JSON-RPC bitcoind service.

View File

@ -8,11 +8,11 @@ import (
"math/big"
vlq "github.com/bsm/go-vlq"
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil"
"github.com/jakm/btcutil/chaincfg"
"github.com/jakm/btcutil/txscript"
"github.com/martinboehm/btcd/blockchain"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil"
"github.com/martinboehm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/txscript"
)
// OutputScriptToAddressesFunc converts ScriptPubKey to bitcoin addresses

View File

@ -10,7 +10,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -14,9 +14,9 @@ import (
"runtime/debug"
"time"
"github.com/btcsuite/btcd/wire"
"github.com/golang/glog"
"github.com/juju/errors"
"github.com/martinboehm/btcd/wire"
)
// BitcoinRPC is an interface to JSON-RPC bitcoind service.

View File

@ -8,9 +8,9 @@ import (
"encoding/binary"
"io"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/chaincfg/chainhash"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -12,7 +12,7 @@ import (
"path/filepath"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -3,8 +3,8 @@ package dash
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -3,8 +3,8 @@ package digibyte
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -6,8 +6,8 @@ import (
"blockbook/bchain/coins/utils"
"bytes"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -15,7 +15,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -3,8 +3,8 @@ package gamecredits
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -4,9 +4,9 @@ import (
"blockbook/bchain"
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/base58"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/base58"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -12,7 +12,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
var (

View File

@ -4,8 +4,8 @@ import (
"blockbook/bchain"
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -3,8 +3,8 @@ package litecoin
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -3,8 +3,8 @@ package monacoin
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -6,8 +6,8 @@ import (
"blockbook/bchain/coins/utils"
"bytes"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -6,8 +6,8 @@ import (
"blockbook/bchain/coins/utils"
"bytes"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -13,7 +13,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"io"
"github.com/btcsuite/btcd/wire"
"github.com/martinboehm/btcd/wire"
)
// minTxPayload is the minimum payload size for a transaction. Note

View File

@ -3,8 +3,8 @@ package vertcoin
import (
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -11,7 +11,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
func TestMain(m *testing.M) {

View File

@ -4,8 +4,8 @@ import (
"blockbook/bchain"
"blockbook/bchain/coins/btc"
"github.com/btcsuite/btcd/wire"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcd/wire"
"github.com/martinboehm/btcutil/chaincfg"
)
const (

View File

@ -12,7 +12,7 @@ import (
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
var (

View File

@ -0,0 +1,62 @@
{
"coin": {
"name": "Bcash",
"shortcut": "BCHSV",
"label": "Bitcoin Cash SV",
"alias": "bcashsv"
},
"ports": {
"backend_rpc": 8046,
"backend_message_queue": 38346,
"blockbook_internal": 9046,
"blockbook_public": 9146
},
"ipc": {
"rpc_url_template": "http://127.0.0.1:{{.Ports.BackendRPC}}",
"rpc_user": "rpc",
"rpc_pass": "rpc",
"rpc_timeout": 25,
"message_queue_binding_template": "tcp://127.0.0.1:{{.Ports.BackendMessageQueue}}"
},
"backend": {
"package_name": "backend-bcashsv",
"package_revision": "satoshilabs-1",
"system_user": "bcashsv",
"version": "0.1.0",
"binary_url": "https://github.com/bitcoin-sv/bitcoin-sv/releases/download/v0.1.0/bitcoin-sv-0.1.0-x86_64-linux-gnu.tar.gz",
"verification_type": "sha256",
"verification_source": "bb4a8049698bb6723526e1bd457a7cfdb919eac491ee3c3b563c6c159ad278e3",
"extract_command": "tar -C backend --strip 1 -xf",
"exclude_files": [],
"exec_command_template": "{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/bin/bitcoind -datadir={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend -conf={{.Env.BackendInstallPath}}/{{.Coin.Alias}}/{{.Coin.Alias}}.conf -pid=/run/{{.Coin.Alias}}/{{.Coin.Alias}}.pid",
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/*.log",
"postinst_script_template": "",
"service_type": "forking",
"service_additional_params_template": "",
"protect_memory": true,
"mainnet": true,
"server_config_file": "bitcoin_like.conf",
"client_config_file": "bitcoin_like_client.conf"
},
"blockbook": {
"package_name": "blockbook-bcashsv",
"system_user": "blockbook-bcashsv",
"internal_binding_template": ":{{.Ports.BlockbookInternal}}",
"public_binding_template": ":{{.Ports.BlockbookPublic}}",
"explorer_url": "",
"additional_params": "",
"block_chain": {
"parse": true,
"subversion": "/Bitcoin ABC:0.17.1/",
"address_format": "cashaddr",
"mempool_workers": 8,
"mempool_sub_workers": 2,
"block_addresses_to_keep": 300,
"additional_params": {}
}
},
"meta": {
"package_maintainer": "Petr Kracik",
"package_maintainer_email": "petr.kracik@satoshilabs.com"
}
}

View File

@ -6,10 +6,10 @@
"alias": "liquid"
},
"ports": {
"backend_rpc": 8046,
"backend_message_queue": 38346,
"blockbook_internal": 9046,
"blockbook_public": 9146
"backend_rpc": 8047,
"backend_message_queue": 38347,
"blockbook_internal": 9047,
"blockbook_public": 9147
},
"ipc": {
"rpc_url_template": "http://127.0.0.1:{{.Ports.BackendRPC}}",

View File

@ -31,7 +31,8 @@ type PortInfoSlice []*PortInfo
type Config struct {
Coin struct {
Name string `json:"name"`
Name string `json:"name"`
Label string `json:"label"`
}
Ports map[string]uint16 `json:"ports"`
}
@ -154,7 +155,11 @@ func loadPortInfo(dir string) (PortInfoSlice, error) {
return nil, fmt.Errorf("%s: json: %s", path, err)
}
item := &PortInfo{CoinName: v.Coin.Name, BackendServicePorts: map[string]uint16{}}
name := v.Coin.Label
if len(name) == 0 {
name = v.Coin.Name
}
item := &PortInfo{CoinName: name, BackendServicePorts: map[string]uint16{}}
for k, v := range v.Ports {
if v == 0 {
continue

View File

@ -18,8 +18,8 @@ import (
"testing"
vlq "github.com/bsm/go-vlq"
"github.com/jakm/btcutil/chaincfg"
"github.com/juju/errors"
"github.com/martinboehm/btcutil/chaincfg"
)
// simplified explanation of signed varint packing, used in many index data structures

View File

@ -1,31 +1,33 @@
# Registry of ports
| coin | blockbook internal port | blockbook public port | backend rpc port | backend service ports (zmq) |
|--------------------------|-------------------------|-----------------------|------------------|-----------------------------|
| Bitcoin | 9030 | 9130 | 8030 | 38330 |
| Bcash | 9031 | 9131 | 8031 | 38331 |
| Zcash | 9032 | 9132 | 8032 | 38332 |
| Dash | 9033 | 9133 | 8033 | 38333 |
| Litecoin | 9034 | 9134 | 8034 | 38334 |
| Bgold | 9035 | 9135 | 8035 | 38335 |
| Ethereum | 9036 | 9136 | 8036 | 38336 p2p, 8136 http |
| Ethereum Classic | 9037 | 9137 | 8037 | |
| Dogecoin | 9038 | 9138 | 8038 | 38338 |
| Namecoin | 9039 | 9139 | 8039 | 38339 |
| Vertcoin | 9040 | 9140 | 8040 | 38340 |
| Monacoin | 9041 | 9141 | 8041 | 38341 |
| DigiByte | 9042 | 9142 | 8042 | 38342 |
| Myriad | 9043 | 9143 | 8043 | 38343 |
| GameCredits | 9044 | 9144 | 8044 | 38344 |
| Groestlcoin | 9045 | 9145 | 8045 | 38345 |
| Testnet | 19030 | 19130 | 18030 | 48330 |
| Bcash Testnet | 19031 | 19131 | 18031 | 48331 |
| Zcash Testnet | 19032 | 19132 | 18032 | 48332 |
| Dash Testnet | 19033 | 19133 | 18033 | 48333 |
| Litecoin Testnet | 19034 | 19134 | 18034 | 48334 |
| Ethereum Testnet Ropsten | 19036 | 19136 | 18036 | 48336 p2p |
| Vertcoin Testnet | 19040 | 19140 | 18040 | 48340 |
| Monacoin Testnet | 19041 | 19141 | 18041 | 48341 |
| Groestlcoin Testnet | 19045 | 19145 | 18045 | 48345 |
| coin | blockbook internal port | blockbook public port | backend rpc port | backend service ports (zmq) |
|----------------------|-------------------------|-----------------------|------------------|-----------------------------|
| Bitcoin | 9030 | 9130 | 8030 | 38330 |
| Bitcoin Cash | 9031 | 9131 | 8031 | 38331 |
| Zcash | 9032 | 9132 | 8032 | 38332 |
| Dash | 9033 | 9133 | 8033 | 38333 |
| Litecoin | 9034 | 9134 | 8034 | 38334 |
| Bitcoin Gold | 9035 | 9135 | 8035 | 38335 |
| Ethereum | 9036 | 9136 | 8036 | 38336 p2p, 8136 http |
| Ethereum Classic | 9037 | 9137 | 8037 | |
| Dogecoin | 9038 | 9138 | 8038 | 38338 |
| Namecoin | 9039 | 9139 | 8039 | 38339 |
| Vertcoin | 9040 | 9140 | 8040 | 38340 |
| Monacoin | 9041 | 9141 | 8041 | 38341 |
| DigiByte | 9042 | 9142 | 8042 | 38342 |
| Myriad | 9043 | 9143 | 8043 | 38343 |
| GameCredits | 9044 | 9144 | 8044 | 38344 |
| Groestlcoin | 9045 | 9145 | 8045 | 38345 |
| Bitcoin Cash SV | 9046 | 9146 | 8046 | 38346 |
| Liquid | 9047 | 9147 | 8047 | 38347 |
| Bitcoin Testnet | 19030 | 19130 | 18030 | 48330 |
| Bitcoin Cash Testnet | 19031 | 19131 | 18031 | 48331 |
| Zcash Testnet | 19032 | 19132 | 18032 | 48332 |
| Dash Testnet | 19033 | 19133 | 18033 | 48333 |
| Litecoin Testnet | 19034 | 19134 | 18034 | 48334 |
| Ethereum Ropsten | 19036 | 19136 | 18036 | 48336 p2p |
| Vertcoin Testnet | 19040 | 19140 | 18040 | 48340 |
| Monacoin Testnet | 19041 | 19141 | 18041 | 48341 |
| Groestlcoin Testnet | 19045 | 19145 | 18045 | 48345 |
> NOTE: This document is generated from coin definitions in `configs/coins`.

View File

@ -18,7 +18,7 @@ import (
"time"
"github.com/golang/glog"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
"github.com/martinboehm/golang-socketio"
"github.com/martinboehm/golang-socketio/transport"
)

View File

@ -20,7 +20,7 @@ import (
"strings"
"testing"
"github.com/jakm/btcutil/chaincfg"
"github.com/martinboehm/btcutil/chaincfg"
)
type TestFunc func(t *testing.T, coin string, chain bchain.BlockChain, testConfig json.RawMessage)