Zebra/zebra-chain/src
Alfredo Garcia eb66f4b1a3
feat(rpc): populate some getblocktemplate RPC block header fields using the state best chain tip (#5659)
* populate block height

* populate cur_time

* populate min_time

* populate capabilities

* populate last_block_hash

* create read state request for getblocktemplate

* refactor to get difficulty fields more properly

* populate bits and target fields

* fix tests

* add target and bits documentation

* docs

* fix docs

* docs

* remove metrixs counter calls

* apply some suggestions from code review

* hide some code behind feature

* simplify the service

* fix error handling

* remove comment

* fox doc

* panic if we dont have enough state

* bring tip data from the state

* make proposal empty

* fix time

* fix docs, consensus rules

* remove non used anymore fn

* remove another non used fn

* remove no needed change

* remove more unused changes

* remove unused anymore change

* apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* fix build and snapshots

* apply testnet consensus rule

* fix test

* rustfmt

* remove time as allowed field to be modified by the miner if mining minimum difficulty block

* move all times to before calculating difficulty

* do some cleanup

* Adjust times so the whole time range is a testnet minimum difficulty block

* Return a GetBlockTemplateChainInfo struct from the difficulty calculation

* Add a Zebra-only max_time field to the getblocktemplate RPC

Co-authored-by: teor <teor@riseup.net>
2022-11-28 09:06:32 +00:00
..
amount build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
block build(deps): bump chrono from 0.4.22 to 0.4.23 (#5629) 2022-11-16 16:47:45 +00:00
chain_tip change(rpc): return an error from getblocktemplate method if Zebra is not synced to network tip (#5623) 2022-11-18 00:12:10 +00:00
fmt cleanup(clippy): Use inline format strings (#5489) 2022-10-27 13:25:18 +00:00
history_tree refactor(anchorSapling): Change type to force consensus rule validation (#3544) 2022-02-17 03:20:22 +00:00
orchard cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
parallel 1. fix(perf): Run CPU-intensive state updates in parallel rayon threads (#4802) 2022-07-22 12:19:11 -04:00
parameters build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
primitives deps(bump): zcash_primitives, zcash_note_encryption, zcash_encoding, orchard, and zcash_script (#5505) 2022-10-31 14:15:11 +00:00
sapling cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
serialization change(mempool): Evict transactions from the mempool using the ZIP-317 conventional fee (#5703) 2022-11-24 01:27:35 +00:00
sprout cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
transaction change(mempool): Evict transactions from the mempool using the ZIP-317 conventional fee (#5703) 2022-11-24 01:27:35 +00:00
transparent fix(consensus): Check network and P2SH addresses for mining config and funding streams (#5620) 2022-11-11 03:42:05 +00:00
value_balance build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
work feat(rpc): populate some getblocktemplate RPC block header fields using the state best chain tip (#5659) 2022-11-28 09:06:32 +00:00
amount.rs 2. change(rpc): Add some transaction fields to the `getblocktemplate` RPC (#5496) 2022-11-03 03:25:01 +00:00
block.rs feature(rpc): add fixed values to getblocktemplate response (#5558) 2022-11-08 22:55:11 +00:00
chain_tip.rs change(rpc): return an error from getblocktemplate method if Zebra is not synced to network tip (#5623) 2022-11-18 00:12:10 +00:00
diagnostic.rs fix(ci): improve test output and test reliability (#5014) 2022-09-02 08:54:40 +00:00
fmt.rs 2. add(log): Log when state requests take a long time (#4815) 2022-07-26 08:33:00 +10:00
history_tree.rs cleanup(clippy): Use inline format strings (#5489) 2022-10-27 13:25:18 +00:00
lib.rs 2. add(log): Log when state requests take a long time (#4815) 2022-07-26 08:33:00 +10:00
orchard.rs cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
parallel.rs 1. fix(perf): Run CPU-intensive state updates in parallel rayon threads (#4802) 2022-07-22 12:19:11 -04:00
parameters.rs Cleanup a few arbitrary impls (#2222) 2021-05-28 09:49:28 -03:00
primitives.rs ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029) 2021-11-11 22:18:37 +00:00
sapling.rs cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
serialization.rs Refactor addr v1 serialization using a separate AddrV1 type (#3021) 2021-11-10 06:47:50 +10:00
shutdown.rs Fix shutdown panics (#1637) 2021-02-03 19:03:28 +10:00
sprout.rs cleanup(cryptography): Remove unused shielded key and address code (#5476) 2022-10-29 20:59:55 +00:00
transaction.rs change(rpc): generate coinbase transactions in the getblocktemplate RPC (#5580) 2022-11-10 00:12:27 +00:00
transparent.rs change(rpc): generate coinbase transactions in the getblocktemplate RPC (#5580) 2022-11-10 00:12:27 +00:00
value_balance.rs 5. change(rpc): Implement coinbase conversion to RPC `TransactionTemplate` type (#5554) 2022-11-07 17:37:50 +00:00
work.rs Replace primitives_types with uint (#2350) 2021-06-18 15:35:05 -03:00