Commit Graph

567 Commits

Author SHA1 Message Date
Jakub Matys
df964abf9d Removed unnecessary stuff 2018-06-07 14:09:24 +02:00
Jakub Matys
b906462331 Added test of ParseBlock method 2018-06-07 14:06:44 +02:00
Martin Boehm
ac0dbdca42 Update bcash rpc service registration 2018-06-07 13:15:09 +02:00
Jakub Matys
70cddf63bf Rename of constant + comment 2018-06-06 14:50:30 +02:00
Jakub Matys
60733b3c9b Renamed bgold package and paths 2018-06-06 14:06:46 +02:00
Jakub Matys
400194a9aa Fixed block and address parsing 2018-06-06 13:02:41 +02:00
Jakub Matys
2d0c56c442 Added Bitcoin Gold support 2018-06-06 13:02:41 +02:00
Martin Boehm
eb716d69ed Take coin name from rpc config json 2018-06-05 16:21:54 +02:00
Martin Boehm
eba668bfd1 Report mempool size in metrics 2018-06-01 13:37:38 +02:00
Martin Boehm
17ed8f7d5d Store mempool size in internal state 2018-06-01 13:22:56 +02:00
Martin Boehm
a899f9e97a Use context to limit shutdown time of bchain/mq 2018-05-30 14:44:59 +02:00
Jakub Matys
1385313908 Merge branch 'bcash-cashaddr' 2018-05-30 13:11:15 +02:00
Jakub Matys
092aeef2ed CashAddr decoding optimization - doesn't support multisig 2018-05-29 19:08:17 +02:00
Jakub Matys
79ba6abadd Upgraded BCash address decoding/encoding 2018-05-29 15:03:25 +02:00
Jakub Matys
ea3cfd2d6a Address format is set in configuration instead of RPC options 2018-05-29 14:15:27 +02:00
Martin Boehm
c74c4dd8ff Modify ZeroMQ shutdown in attempt to avoid getting stuck occasionally 2018-05-29 12:15:20 +02:00
Jakub Matys
78d7ff3a96 Merge branch 'zcash' 2018-05-29 09:11:21 +02:00
Martin Boehm
f11c4f7791 Fix get mempoool imput addresses concurrently 2018-05-28 17:48:39 +02:00
Martin Boehm
919a26dfd6 Get mempoool imput addresses concurrently 2018-05-28 16:50:54 +02:00
Martin Boehm
e5d79b09bc Put parameters for mempool sync to coin configuration json 2018-05-28 16:04:05 +02:00
Martin Boehm
8b20c38136 Put parameter BlockAddressesToKeep to coin configuration json 2018-05-28 14:57:44 +02:00
Martin Boehm
81870aeb1a Change ZeroMQ shutdown synchronization 2018-05-28 10:46:44 +02:00
Jakub Matys
9f3b1510b0 Fixed empty Address field when transaction was unpacked from JSON 2018-05-23 16:13:06 +02:00
Jakub Matys
110bd6f6a6 Added testnet for ZCash 2018-05-23 12:55:50 +02:00
Jakub Matys
58876150c3 Removed unused code 2018-05-23 12:55:50 +02:00
Jakub Matys
6c6f929743 Fixed import of blocks with invalid transactions (genesis block) 2018-05-23 12:55:50 +02:00
Martin Boehm
d2f60044fc Add extended logging to utxo mempool 2018-05-23 12:30:19 +02:00
Jakub Matys
9e414dd842 Changed ports of blockbook and backend nodes 2018-05-23 11:00:13 +02:00
Martin Boehm
1b3fc581ac Fix ethrpc_test after address unpacking modification 2018-05-21 13:53:15 +02:00
Jakub Matys
3634041e90 Merge branch 'fix-address-unpacking' 2018-05-19 15:16:04 +02:00
Jakub Matys
d79aaefb8f bcashAddress stores btcutil's Address because of address conversions 2018-05-19 15:14:15 +02:00
Jakub Matys
3ecb380ef4 Fixed empty Address field when transaction was unpacked from JSON 2018-05-18 15:04:40 +02:00
Martin Boehm
f5a8bed629 Use coin specific interface when creating mempool 2018-05-17 12:30:45 +02:00
Martin Boehm
bc6f8a9e5d Retry connection to blockchain rpc on startup
After restart, the blockchain daemons are not immediately ready
to serve requests. Blockbook must wait for them.
2018-05-17 11:52:16 +02:00
Martin Boehm
9aaa242d09 Update logging in utxo mempool 2018-05-17 10:46:18 +02:00
Martin Boehm
7118581b3b Add logging to utxo mempool 2018-05-16 14:30:12 +02:00
Martin Boehm
83907e08b8 Speedup btc mempool synchronization - get transactions in parallel 2018-05-15 23:41:09 +02:00
Martin Boehm
a2c7625a59 Speedup btc mempool synchronization - use nonverbose getrawtransaction 2018-05-14 18:12:01 +02:00
Martin Boehm
7281fb27b1 Implement UTXO mempool indexv2 2018-05-01 23:43:36 +02:00
Martin Boehm
3f4af20951 Recover from ocasional panic caused by zmq during shutdown 2018-05-01 22:56:50 +02:00
Martin Boehm
7de8726979 Cleanup mempool usage, remove obsolete GetMempoolSpentOutput 2018-05-01 22:48:58 +02:00
Martin Boehm
2c7c850e50 Merge branch 'master' into indexv2 2018-04-30 15:16:05 +02:00
Jakub Matys
def8ada730 added tests of BCashParser and bcashAddress 2018-04-27 12:00:16 +02:00
Jakub Matys
5eb9f613a5 fixed tests 2018-04-27 11:09:44 +02:00
Jakub Matys
ab2ab365a9 added subversion field to result of getinfo 2018-04-27 10:53:33 +02:00
Martin Boehm
9017d1bffd Merge branch 'master' into indexv2 2018-04-26 14:36:54 +02:00
Jakub Matys
a929f27d5c implemented estimatesmartfee method 2018-04-25 13:38:03 +02:00
Jakub Matys
9c93674918 added support of bcash addresses to RPCs 2018-04-24 11:20:09 +02:00
Martin Boehm
f78b050234 Fix indexing of coinbase transactions 2018-04-20 23:53:17 +02:00
Martin Boehm
febcba5fbe Use new db column blockaddresses to support UTXO chain block disconnect 2018-04-20 13:56:55 +02:00
Jakub Matys
b88a88ad55 use abstract address for Vout 2018-04-19 00:49:56 +01:00
Jakub Matys
a8e603d945 added Bitcoin Cash's rpc and parser 2018-04-18 14:15:19 +01:00
Martin Boehm
f5e69506c0 Skip ethrpc integration tests in short tests 2018-04-13 16:24:53 +02:00
Martin Boehm
189c2cb24c Update eth.md 2018-04-10 12:12:41 +02:00
Martin Boehm
10c05dc176 Update eth mainnet configuration 2018-04-09 16:32:05 +02:00
Martin Boehm
cc2c7d5112 Update README 2018-04-09 12:06:04 +02:00
Martin Boehm
feaf55e767 Store transactions using protobuf in default baseparser implemention 2018-04-09 10:42:58 +02:00
Martin Boehm
d0089d2bcb Add BaseParser as base functionality of parsers to avoid code duplicity 2018-04-08 15:50:19 +02:00
Martin Boehm
9727a3dc8c Handle ethereum txid and block hash with the standard 0x prefix 2018-04-08 12:09:18 +02:00
Martin Boehm
a75376706e Move packing/unpacking of Txid and Block Hash to coin specific code 2018-04-08 11:24:29 +02:00
Martin Boehm
8a8952d103 Return ethereum address including the standard 0x prefix 2018-04-07 23:44:38 +02:00
Martin Boehm
f8eca976ab Fix computation of confirmations 2018-04-06 17:13:38 +02:00
Martin Boehm
5912e941e3 Update README 2018-04-06 12:01:28 +02:00
Martin Boehm
40619d126f Reconnect subsciptions after recovery from network/geth failure 2018-04-06 11:03:55 +02:00
Martin Boehm
9aec4ec717 Implement EthereumParser.UnpackTx using protobuf 2018-04-05 12:41:15 +02:00
Martin Boehm
5b2aa276ee Implement EthereumParser.PackTx using protobuf 2018-04-04 20:25:55 +02:00
Martin Boehm
9fdc9ec4ac Unify eth function and type names 2018-04-03 22:24:23 +02:00
Martin Boehm
bbd51e3624 Handle notifications of new mempool transactions in eth 2018-04-03 18:22:36 +02:00
Martin Boehm
d1a047c667 Add non UTXO mempool implementation 2018-04-03 15:51:38 +02:00
Martin Boehm
4e43f0d482 Implement BlockChain.GetMempool in ethrpc 2018-03-29 17:30:12 +02:00
Martin Boehm
090bb8e4f1 Stop passing of missing address in eth tx to bchain.Tx 2018-03-29 15:47:41 +02:00
Martin Boehm
39a31d4544 Handle transactions with missing ethereum To address 2018-03-28 13:23:43 +02:00
Martin Boehm
2f4b48b3d6 Subscribe and handle eth notifications about new block 2018-03-28 10:25:08 +02:00
Martin Boehm
19d071a184 Remove bitcoin specific code from MQ push handler 2018-03-27 23:39:06 +02:00
Martin Boehm
3127e5b5c2 Handle error returned from BlockChain.Initialize 2018-03-27 23:18:25 +02:00
Martin Boehm
83bce22e28 Merge branch 'master' into ethereum 2018-03-27 17:36:50 +02:00
Martin Boehm
26de7eb384 Rename mempool to mempool_utxo 2018-03-27 17:36:16 +02:00
Martin Boehm
2fe6118aca Implement EstimateFee for eth 2018-03-27 16:34:58 +02:00
Martin Boehm
73486e851f Merge branch 'master' into ethereum 2018-03-27 15:40:06 +02:00
Jakub Matys
d6920b6057 Added support of ErrBlockNotFound 2018-03-27 15:26:30 +02:00
Jakub Matys
6a49abe8bb Merge branch 'master' into zcash 2018-03-27 11:14:20 +02:00
Jakub Matys
8184f4e935 Disabled unstable test 2018-03-27 11:09:31 +02:00
Jakub Matys
18ce3edac3 Added RPC method EstimateFee 2018-03-27 10:30:30 +02:00
Martin Boehm
6a7bc6aff7 Stop processing Value in eth transactions, it exceeds used numeric type 2018-03-26 23:42:35 +02:00
Martin Boehm
a4b9a21445 Annotate error in eth rpc 2018-03-26 18:14:26 +02:00
Martin Boehm
3169446adb Implement eth parser GetAddrIDFromAddress 2018-03-26 18:08:46 +02:00
Martin Boehm
09a9e623c1 Return ErrBlockNotFound from eth GetBlock methods 2018-03-26 17:47:46 +02:00
Martin Boehm
4de5673bb3 Merge branch 'master' into ethereum 2018-03-26 17:19:16 +02:00
Martin Boehm
b1694b4a61 Support sync of blockchains without block.next hash 2018-03-26 16:44:54 +02:00
Martin Boehm
341393b1eb Define error ErrBlockNotFound and implement it in btc 2018-03-26 15:17:44 +02:00
Martin Boehm
3dcbaeb34e Get eth block by height 2018-03-26 13:57:40 +02:00
Jakub Matys
71eec95c5b ZCash uses decoded address as AddrID 2018-03-26 11:41:32 +02:00
Martin Boehm
a5c4dd0d70 Implement and test eth GetBlock and GetTransaction 2018-03-25 00:30:09 +01:00
Jakub Matys
00acae08f5 Merge branch 'master' into zcash 2018-03-23 16:11:56 +01:00
Martin Boehm
e8eca5c6ea Update EthParser to match BlockChainParser interface 2018-03-23 13:25:42 +01:00
Martin Boehm
0f388272d0 Merge branch 'master' into ethereum 2018-03-23 13:15:58 +01:00
Martin Boehm
44fdb5528b Support indexing of non UTXO chains 2018-03-23 13:15:35 +01:00
Martin Boehm
32a2c1a417 Remove unnecessary methods from BlockChainParser interface 2018-03-23 13:15:19 +01:00
Jakub Matys
d35dd77695 Implemented EstimateSmartFee by calling of legacy estimatefee RPC 2018-03-23 12:04:17 +01:00
Martin Boehm
dda80bd074 Refactor names in interface BlockChainParser, added method IsUTXOChain 2018-03-23 11:03:41 +01:00
Martin Boehm
40198ae437 Implement eth GetBlock and GetTransaction 2018-03-22 15:56:21 +01:00
Jakub Matys
80959fd9d6 ZCashRPC.GetBlock skips invalid/missing transactions during sync 2018-03-22 15:45:08 +01:00
Jakub Matys
4421dc94dc Added empty methods for missing RPCs 2018-03-22 15:43:14 +01:00
Martin Boehm
cfdbeb8a9b Remove unnecessary fields from bchain.ScriptPubKey struct 2018-03-22 14:07:14 +01:00
Jakub Matys
afa4d17e5f Added tests of ZCashBlockParser 2018-03-21 17:04:37 +01:00
Jakub Matys
ef73d52063 Removed unused package import 2018-03-21 16:46:35 +01:00
Jakub Matys
bf83b6e213 Merge branch 'master' into zcash 2018-03-21 16:03:09 +01:00
Jakub Matys
c0de004c6c Removed dependency of ZCashBlockParser on BitcoinBlockParser 2018-03-21 15:47:59 +01:00
Martin Boehm
6a346f8f49 Implement interface changes in ethereum 2018-03-21 15:47:31 +01:00
Jakub Matys
83ec7a37a6 Removed bitcoin parameters from ZCashRPC's initialization method 2018-03-21 15:47:02 +01:00
Martin Boehm
2567ae69b0 Merge branch 'master' into ethereum 2018-03-21 15:40:18 +01:00
Martin Boehm
f0552ec4ad Remove metrics from specific coin implementations 2018-03-21 15:33:48 +01:00
Jakub Matys
fc1efc791e Added methods for packing/unpackings ZCash transactions 2018-03-21 15:25:27 +01:00
Martin Boehm
a7d82761f9 Merge branch 'zcash' into master 2018-03-21 14:50:38 +01:00
Martin Boehm
f1b1f9fe55 Implement generic timing of blockchain rpc calls 2018-03-21 01:23:17 +01:00
Martin Boehm
6d3ba2e690 Update ethrpc/ethparser to match modified BlockChain interface 2018-03-21 00:32:29 +01:00
Jakub Matys
a9effbe835 Added ZCashBlockParser 2018-03-20 17:28:03 +01:00
Martin Boehm
3c97142dd1 Merge branch 'master' into ethereum 2018-03-20 17:07:40 +01:00
Jakub Matys
bad16b1404 fixes 2018-03-20 16:07:05 +01:00
Jakub Matys
d09333fa2e WIP: zcash 2018-03-20 16:05:50 +01:00
Jakub Matys
fbfb33cb5d Output index uses abstract identifier instead of outputScript 2018-03-20 16:01:36 +01:00
Martin Boehm
4486795c3d Extend the eth rpc interface, create tests for interface 2018-03-20 14:43:15 +01:00
Martin Boehm
95af897e8e Update eth setup description 2018-03-20 14:07:46 +01:00
Martin Boehm
6995a70489 Implement part of bchain.BlockChain interface for ethereum 2018-03-19 17:36:18 +01:00
Martin Boehm
fc77df3004 Detect ethereum network type 2018-03-19 17:34:51 +01:00
Martin Boehm
fab41105b2 Fix typo 2018-03-19 12:05:58 +01:00
Martin Boehm
971b6397d6 Put rpc config to external file 2018-03-19 12:05:16 +01:00
Martin Boehm
f336217c1d Merge branch 'master' into ethereum 2018-03-19 11:47:24 +01:00
Martin Boehm
6f1c2cebbc Change order of log messages in bitcoin rpc startup 2018-03-19 11:02:19 +01:00
Martin Boehm
bb9d8c5df7 Update bitcoinrpc documentation to reflect changes in configuration 2018-03-19 11:01:42 +01:00
Martin Boehm
9c94db13f6 Move rpc config to external json file, move zeromq to btc implementation 2018-03-15 12:34:29 +01:00
Martin Boehm
4b121dd60f Call first eth rpc method 2018-03-15 11:38:31 +01:00
Martin Boehm
a61ea71d08 Add preliminary ethereum setup documentation 2018-03-15 11:37:23 +01:00
Martin Boehm
a803d89690 Add ethereum support - initial commit 2018-03-15 08:20:19 +01:00
Jakub Matys
96a60bf7fa Renamed metrics and added implicit label coin 2018-03-14 09:45:10 +01:00
Martin Boehm
a86e948e78 Update documentation 2018-03-13 16:09:28 +01:00
Martin Boehm
c549862e63 Add btc-testnet coin support 2018-03-13 16:07:24 +01:00
Jakub Matys
d7229f8db0 added prometheus metrics 2018-03-13 11:44:50 +01:00
Martin Boehm
60a1e34572 Update README, add separate documentation for each supported coin 2018-03-12 18:00:27 +01:00
Martin Boehm
b55306b6eb Hide GetBlockWithoutHeader BTC optimization from BlockChain interface 2018-03-12 17:37:32 +01:00
Martin Boehm
fbc5248ef8 Handle HTTP status codes returned from blockchain rpc 2018-03-11 01:31:09 +01:00
Martin Boehm
23b795ccc7 Add base for ZCash support 2018-03-08 19:39:21 +01:00
Martin Boehm
9d0547f608 Use blockchain factory to create blockchain interface 2018-03-08 18:36:01 +01:00
Jakub Matys
69b88275bd added RPC method getmempoolentry 2018-03-08 14:15:06 +01:00
Martin Boehm
f80ae32846 Abstract bitcoinrpc in preparation for alt coins 2018-03-08 12:59:37 +01:00
Martin Boehm
0783cac294 Detect type of the block chain and use correct chain params 2018-03-07 09:38:19 +01:00
Martin Boehm
58205ed84a Store transactions in RocksDB 2018-03-05 18:14:41 +01:00
Martin Boehm
54ddfa9e03 Refactore address conversion functions to bitcoinwire.go 2018-03-05 16:54:05 +01:00
Martin Boehm
a866628ad0 Add unit tests for AddressToOutputScript and OutputScriptToAddresses 2018-03-03 23:46:12 +01:00
Martin Boehm
f343194074 Add helper blockchain function OutputScriptToAddresses 2018-03-03 23:45:00 +01:00
Martin Boehm
a165d71597 Remove unnecessary data from bitcoin.Tx struct 2018-03-02 16:07:45 +01:00
Martin Boehm
a04fd8642e Use custom http transport settings in bitcoind rpc 2018-03-02 13:54:21 +01:00
Martin Boehm
1eb77fbc27 Fix possible memory leak in bitcoind rpc call 2018-03-02 13:49:32 +01:00
Martin Boehm
1c68070d78 Remove unnecessary data from bitcoin.Tx struct 2018-03-02 13:45:39 +01:00
Martin Boehm
34400f5b2b Add context to errors returned by bitcoinrpc 2018-03-01 11:06:10 +01:00
Martin Boehm
f8fbbcfe29 Connect blocks in parallel without getting block header - optimization 2018-03-01 00:32:40 +01:00
Martin Boehm
e075f28913 Increate MaxIdleConnsPerHost for BitcoinRPC http client 2018-02-27 20:39:27 +01:00
Martin Boehm
dc24d1da7a Improve shutdown of MQ 2018-02-26 13:10:53 +01:00
Martin Boehm
531da09227 Improve ZeroMQ startup/shutdown 2018-02-23 11:56:44 +01:00
Martin Boehm
26c726c771 Notify socket.io subscribers about new block 2018-02-22 13:32:06 +01:00
Martin Boehm
b2b9cc3f73 Implement SendRawTransaction Bitcoind RPC method 2018-02-20 12:01:42 +01:00
Martin Boehm
90a9edda41 Implement Bitcore socket.io method getAddressHistory 2018-02-08 13:28:10 +01:00
Martin Boehm
bcc8de4763 Implement Bitcore socket.io method estimateSmartFee 2018-02-07 19:59:09 +01:00
Martin Boehm
2598dff10d Process inputs in mempool 2018-02-03 19:00:57 +01:00
Martin Boehm
ed47171406 Measure duration of mempool sync 2018-02-01 11:23:37 +01:00
Martin Boehm
7185060f62 Synchronize mempool 2018-01-31 17:51:48 +01:00
Martin Boehm
a403b8d0fe Rename package bitcoin to bchain 2018-01-31 15:23:17 +01:00