Larry Ruane
c006cfe5fb
compact blocks should include Orchard transactions
...
In previous commit, I forgot to include Orchard transactions in compact
blocks (so they will now include transactions with either Sapling or
Orchard transactions).
2021-11-30 14:23:18 -07:00
Larry Ruane
4e1910aeea
add NU5 Orchard transaction data to CompactBlock
2021-11-30 10:16:28 -07:00
Larry Ruane
fdc54babf2
performance: don't deserialize unused tx fields
2021-11-30 08:36:09 -07:00
Larry Ruane
6d7d9f11a6
improve tx parser memory behavior
...
This is a non-functional change. Instead of `rawTransaction` (which
carries the result of parsing a full transaction from zcashd) containing
slices of _pointers_ to separately-allocated memory (one allocation for
each spend, for example), allocate a slice of spends (one contiguous
range of memory). A quick benchmark shows sync improves by about 8%.
2021-11-29 18:24:44 -07:00
Larry Ruane
ddf3781a60
parse V5 (nu5) transactions
...
TODO:
- store, instead of just skip over, nu5 transaction fields
- add relevant nu5 fields to CompactBlock
- restore disabled V4 unit tests
- add V5 test vectors to unit tests
The reason most of the V4 transaction and block unit tests are removed
is that they used V3 transactions, which lightwalletd never sees in
production, since lightwalletd starts at Sapling activation (which has
V4 transactions). So these tests were always wrong, in a way. This
commit simplifies the parsing code by removing support for V3 (since it
was never needed). The tests need to be updated to V4, but we'll do
that in a later PR.
2021-10-24 13:30:35 -06:00
Dimitris Apostolou
b450634ab7
Fix typos
2020-12-21 13:03:41 -07:00
Larry Ruane
ac1bf8481c
refactor Reverse(), no functional changes
2020-09-14 10:31:17 -06:00
Larry Ruane
faca1ecbef
increase the 252 per-block transaction limit ( #273 )
2020-06-03 18:58:26 -06:00
Larry Ruane
f1e793796f
implement staging, not well tested
2020-05-21 11:48:03 -06:00
Larry Ruane
52ac837370
New "staging" api (StageBlocks, StageTransactions, ApplyStaged)
...
Also remove the initial block load (all blocks will come from the
Staging APIs), but there is still more to do (this does not even
start up correctly) but darkside.proto is correct, we believe.
2020-05-21 11:48:03 -06:00
Larry Ruane
86fd87404b
add darkside SetMetaState, SetBlocksURL for reorg testing
2020-05-21 11:48:03 -06:00
Larry Ruane
c2a6306ce5
Misc cleanups and fixes
...
- improved corruption recovery (don't back up by just 1 block at a time)
- move darksidewallet gRPCs to their own .proto file
- this force-push removes my commits for reorg testing using SetState
2020-04-24 16:55:47 -06:00
Taylor Hornby
d55d9b1c64
Add tool for generating fake blockchains
2020-04-24 16:55:47 -06:00
Larry Ruane
e71de4d88f
rebase PR 175 - Use cobra and viper for configuration
2020-03-18 12:13:30 -06:00
Larry Ruane
1dc439080b
add COPYING and copyright lines
2020-03-12 12:02:55 -06:00
Larry Ruane
a4f968823f
test improvements, and minor cleanups
2020-01-31 16:36:31 -07:00
Larry Ruane
36b5c588ec
improve test coverage
2019-11-06 10:50:24 -07:00
Larry Ruane
82d4312196
add test for blockHeader.GetDisplayPrevHash() but needs work
2019-11-05 13:55:04 -07:00
Larry Ruane
7b78663312
refactor GetDisplayPrevHash(), part of block header
2019-11-05 13:55:04 -07:00
Larry Ruane
389e9a4386
run gofmt on all files (one-time)
2019-10-30 10:43:51 -06:00
Larry Ruane
5c77cca6bf
remove unnecessary ok's, no functional change ( #118 )
2019-10-29 17:35:13 -07:00
Larry Ruane
4724e403a3
add tests for GetTx* methods
2019-10-16 16:11:36 -06:00
Larry Ruane
6dab32677a
add test for tx GetDisplayHash()
2019-10-14 10:43:18 -06:00
Larry Ruane
886250e660
GetDisplayPrevHash() should not change its argument
2019-10-07 14:00:10 -06:00
Larry Ruane
20763199c1
add bytestring tests
2019-09-25 09:31:49 -06:00
Larry Ruane
da2231f423
add missing tests, empty (stubs) for now
2019-09-25 09:31:49 -06:00
Marshall Gaucher
6302175a00
Merge pull request #78 from LarryRuane/fix-length-encoding
...
fix compact size length calculation
2019-09-25 08:04:14 -07:00
Dimitris Apostolou
e8d93c0687
Fix typos
2019-09-25 15:01:46 +03:00
Larry Ruane
20d0a040e3
fix compact size length calculation
2019-09-23 15:08:02 -06:00
mdr0id
1002580cd9
Add storing prevhash to local db and logs
2019-07-09 15:52:35 -07:00
Larry Ruane
2454b05b52
add prev_hash to logging
2019-06-28 12:22:22 -05:00
mdr0id
397a02ba0f
Update block name for exporting conflict
2019-06-06 17:44:13 -07:00
Jack Grigg
49a1552523
parser: Correctly serialize Equihash solution
2019-05-23 14:09:43 +01:00
Jack Grigg
722118ade9
Add range check on height extracted from coinbase script
2019-05-22 12:04:02 -04:00
Jack Grigg
bb62739502
Test against the first 20 mainnet blocks
2019-05-22 12:04:02 -04:00
Jack Grigg
0e4add3950
Idiomatic constant naming
2019-05-22 12:04:02 -04:00
Jack Grigg
ca123682cc
Improve references to serializing and parsing int64 in CScripts
2019-05-22 12:04:02 -04:00
Jack Grigg
5acfb9af34
parser: Correctly parse heights from script-encoded int64 values
2019-05-22 12:04:02 -04:00
Jack Grigg
7451d85d15
parser: Add PrevHash field to CompactBlocks
2019-05-04 12:21:01 +01:00
George Tankersley
6d28a409bc
parser: replace genesis "blockheight" with zero
2019-02-25 14:20:44 -05:00
George Tankersley
d81f06e513
parser: fix fOverwintered check for nExpiryHeight
2019-02-14 00:24:25 +00:00
George Tankersley
d08abe82b4
walletrpc: improve protobuf/grpc package naming
2019-02-14 00:18:14 +00:00
George Tankersley
7726a6752d
cleanup: rename package and vendor dependencies for old go versions
...
Fixes #8 and begins to address deployability.
2019-01-03 19:14:51 +00:00
George Tankersley
7d7390eeae
parser: include block time in compact encodings
2018-12-17 18:51:30 -05:00
George Tankersley
a8e099d0fa
parser: cache block heights from coinbase
2018-12-14 21:54:59 -05:00
George Tankersley
71c0624abe
ingest: make zmq client store raw transaction data
2018-12-14 21:54:33 -05:00
George Tankersley
abca4335ec
tests: unify testdata directory
2018-12-14 19:19:12 -05:00
George Tankersley
f35e72923a
parser: stop sending non-Sapling transactions (e.g. coinbase) in compact block vtx
2018-12-11 21:58:43 +00:00
George Tankersley
80b063fe8e
parser: expose little-endian hashes for harmony with wire format
2018-12-11 01:38:57 -05:00
George Tankersley
38d61b509c
rpc: update for API and protobuf changes
2018-12-04 18:22:06 -05:00