Commit Graph

33 Commits

Author SHA1 Message Date
Aditya Kulkarni 994e8a05f2 Merge 'upstream/master' 2022-06-07 09:44:48 -05:00
Larry Ruane dfac02093d Fix V5 transaction txid (#392)
This is a shortcut fix. Instead of replicating the zip244 transaction
logic that's implemented in librustzcash:
zcash_primitives/src/transaction/components/orchard.rs

cheat by calling getblock with verbose level 1, which prints the txid
of each transaction. This currently requires calling getblock twice,
once for the raw hex (as we have always done), and again to get the
transaction IDs. An easy improvement would be to add the raw hex to
verbosity 1 result. (Or have a new verbosity that shows both.)
2022-05-24 09:23:15 -05:00
Larry Ruane 26df6f0992 add V5 transaction (orchard) parsing test 2022-04-12 00:05:29 -06:00
Larry Ruane 631bb16404 fix orchard action ciphertext comment
No functional change. See:
https://github.com/zcash/librustzcash/pull/515#discussion_r808624455
2022-02-16 22:22:46 -07:00
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
adityapk00 0605b33e39 Merge 2021-04-19 13:38:25 -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 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
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 5c77cca6bf remove unnecessary ok's, no functional change (#118) 2019-10-29 17:35:13 -07:00
Dimitris Apostolou e8d93c0687
Fix typos 2019-09-25 15:01:46 +03:00
Aditya Kulkarni 7644852fc6 Fix hash encoding, change module names 2019-09-12 12:08:53 -07: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 71c0624abe ingest: make zmq client store raw transaction data 2018-12-14 21:54:33 -05: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
George Tankersley 0dee0b425e storage: begin implementing sqlite3 storage 2018-11-19 18:20:59 -05:00
George Tankersley 7cc7095a81 parser: implement Compact Block encoding from ZIP307 2018-11-18 01:29:27 +00:00
George Tankersley 768e5242dc parser: implement transaction GetHash()
Manually tested against the blocks in testdata.
2018-11-16 22:47:52 +00:00
George Tankersley 58e5f3e78b parser: implement whole-block parsing and publicize constructors 2018-09-28 00:52:40 +00:00
George Tankersley b9ddd9483d parser: correct minor errors 2018-09-20 22:40:13 +00:00
George Tankersley 30370cd206 parser/internal/bytestring: return CompactSize reads as int rather than uint64 2018-09-20 22:09:58 +00:00
George Tankersley 2d9cf24f74 parser: use nil to indicate zero-count vectors 2018-09-20 21:54:55 +00:00
George Tankersley dfb05c261d parser: finish first pass transaction parsing 2018-09-20 21:44:59 +00:00
George Tankersley 4bd20d9dab parser: WIP transaction parsing 2018-09-20 20:39:26 +00:00