teor
54cb9277ef
Allow some new clippy nightly lints
2020-11-17 10:07:37 +10:00
Jane Lusby
a6bd77e98a
Add check to ensure heights in state service are sequential ( #1290 )
...
* Add check to ensure heights in state service are sequential
Co-authored-by: teor <teor@riseup.net>
2020-11-17 09:53:33 +10:00
Jane Lusby
4c2b44be93
Add tests for QueuedBlocks ( #1268 )
...
* Add unit test for QueuedBlocks
* Add test for pruned blocks
2020-11-17 09:31:22 +10:00
teor
2253ab3c00
Improve state request docs
...
Document best and any chain requests
Explain that the block locator is sparse
2020-11-17 07:52:53 +10:00
teor
ca4e792f47
Put messages in request/response order
...
And fix a comment typo
2020-11-17 07:52:53 +10:00
Jane Lusby
57637560b9
Add internal iterator API for accessing relevant chain blocks ( #1271 )
...
* Add internal iterator API for accessing relevant chain blocks
* get blocks from all chains in non_finalized state
* Impl FusedIterator for service::Iter
* impl ExactSizedIterator for service::Iter
* let size_hint find heights in side chains
Co-authored-by: teor <teor@riseup.net>
2020-11-16 12:22:53 +10:00
Deirdre Connolly
2b8d696221
Better naming workflows ( #1301 )
...
* Better workflow names
* We run zebrad
2020-11-15 01:17:46 -05:00
Deirdre Connolly
bb99a5aa2a
Linewrap
2020-11-14 23:19:31 -05:00
Deirdre Connolly
87d749ee4f
I love it when capitalization matters, contrary to the docs
2020-11-14 22:31:38 -05:00
Deirdre Connolly
477eac7f19
Properly use Dockerfile ARG values
2020-11-14 22:31:38 -05:00
Deirdre Connolly
7023465d91
Pass in workflow inputs for network and checkpoint_sync (with defaults) all the way down
2020-11-14 22:31:38 -05:00
Deirdre Connolly
1a1240a943
Rearrange some deploy flags
2020-11-14 22:31:38 -05:00
Deirdre Connolly
472163f817
Add a manual zebrad node deploy workflow
2020-11-14 22:31:38 -05:00
dependabot[bot]
18eb4d1c31
build(deps): bump primitive-types from 0.7.2 to 0.7.3
...
Bumps [primitive-types](https://github.com/paritytech/parity-common ) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/paritytech/parity-common/releases )
- [Commits](https://github.com/paritytech/parity-common/compare/primitive-types-v0.7.2...primitive-types-v0.7.3 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-11-13 15:59:04 -05:00
dependabot[bot]
8c5f6d0177
build(deps): bump once_cell from 1.5.1 to 1.5.2
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.5.1...v1.5.2 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-11-13 14:48:11 -05:00
Jane Lusby
7403897fda
Add transcript tests as described in the state service tracking issue ( #1281 )
...
* Add transcript test for requests while state is empty
* Add happy path test for each query once the state is populated
* let populate logic handle out of order blocks
2020-11-13 10:19:47 -08:00
Jane Lusby
8ba9d0114b
Add consensus critical check for sequential heights ( #1291 )
...
* Add consensus critical check for sequential heights
* document the check module
* Add unit tests for consensus checks
2020-11-13 14:26:16 +10:00
teor
0dc38608ef
Add missing anchors to the RFC template
2020-11-12 21:59:42 -05:00
Jane Lusby
7c0275ac0b
reorganize stop check ( #1288 )
...
* reorganize stop check
* remove unused enum
* move out and make it unique
Co-authored-by: teor <teor@riseup.net>
2020-11-13 11:37:52 +10:00
teor
af4797130b
Replace Target<block::Height> with TargetHeight ( #1289 )
...
We don't use this generic, so let's just remove it.
2020-11-12 16:11:25 -08:00
teor
4e07719a7d
Add a maximum queued height metric to the finalized state ( #1262 )
...
* Add a maximum queued height metric to the finalized state
And rename all the finalized state metrics to contain "finalized".
* Use i32 and -1 instead of Option<Height>
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-11-13 09:49:55 +10:00
teor
96b7572bb5
Make the checkpoint metrics more accurate
2020-11-13 09:41:14 +10:00
Henry de Valence
e0c92167bc
Revert "Hedge every syncer block download request"
...
This reverts commit 656bd24ba7 .
The Hedge middleware keeps a pair of histograms, writing into one in the
current time interval and reading from the previous time interval's
data. This means that the reverted change resulted in doubling all
block downloads until after at least the second measurement interval
(which means that the time measurements are also incorrect, as they're
operating under double the network load...)
2020-11-12 16:45:47 -05:00
Deirdre Connolly
8b5b1b49cc
Run acceptance tests post-merge with large cached state ( #1282 )
...
* Create and mount persistent disk to store zebrad state, update runner container config to use
* Enable checkpoint sync in zebrad image config
* Lower state memory cache from 500MB to 50MB
* Upgrade host to n2-standard-4
* Bump zebrad-cache disk size to 100GB
* Copy zebrad as the tests are compiled with a hardcoded path to it
* Rename all debug binaries for easy invocation
* Name state cache disk, use the correct path to binaries
* Create volume and all that jazz on instance creation
Otherwise there's a lot of on-instance commands to do that is just handled by this shortcut.
* Explicitly mount the state cache and cleanup test instance
* Wait for zebra-test container to start then attach
* Always clean up even if the tests step fails
* Keep fast sleep but only print 'waiting' once
2020-11-12 15:18:35 -05:00
Jane Lusby
32934bd574
remove redundant conversions
2020-11-12 09:14:52 -05:00
Jane Lusby
a5861e5ad9
use arbitrary for creating work
2020-11-12 09:14:52 -05:00
Jane Lusby
b287ea58c2
Add proptest for work roundtrip
2020-11-12 09:14:52 -05:00
Jane Lusby
a798074088
split conversion into a fn
2020-11-12 09:14:52 -05:00
Jane Lusby
ae843d856f
Add comment explaining work to expanded conversion
2020-11-12 09:14:52 -05:00
Jane Lusby
1bc833dbcc
Move work conversion helpers to test code
2020-11-12 09:14:52 -05:00
Jane Lusby
beede1c03d
tweek chain test to use set_work
2020-11-12 09:14:52 -05:00
Jane Lusby
c41a7303fa
Add helpers for setting work on fake chains
2020-11-12 09:14:52 -05:00
Jane Lusby
dc9081b738
clarify test name
2020-11-12 09:14:52 -05:00
Jane Lusby
a398e96f79
Update zebra-state/src/service/memory_state/non_finalized_state.rs
...
Co-authored-by: teor <teor@riseup.net>
2020-11-12 09:14:52 -05:00
Jane Lusby
c54b07eb32
Update zebra-state/src/service/memory_state/non_finalized_state.rs
...
Co-authored-by: teor <teor@riseup.net>
2020-11-12 09:14:52 -05:00
Jane Lusby
8279c65218
Update zebra-state/src/service/memory_state/non_finalized_state.rs
...
Co-authored-by: teor <teor@riseup.net>
2020-11-12 09:14:52 -05:00
Jane Lusby
104b5406d5
Update book/src/dev/rfcs/0005-state-updates.md
...
Co-authored-by: teor <teor@riseup.net>
2020-11-12 09:14:52 -05:00
Jane Lusby
dcc19f6b25
fully cover commit_block
2020-11-12 09:14:52 -05:00
Jane Lusby
74af22e5ca
Add unit tests for
2020-11-12 09:14:52 -05:00
Deirdre Connolly
95fce3ad68
Pin the version of tarpaulin used for collecting coverage to 0.16.0
...
0.17.0 has a bug that causes segfaults:
https://github.com/xd009642/tarpaulin/issues/618
2020-11-12 00:51:38 -05:00
teor
18bd5e5fbd
Update Cargo.lock
...
We need spandoc 0.2.1 to avoid a panic on empty blocks.
2020-11-12 12:30:54 +10:00
teor
9baec96c18
Add tests for testnet minimum difficulty blocks
2020-11-12 12:30:54 +10:00
teor
92dd16c114
Add minimum difficulty testnet block vectors
2020-11-12 12:30:54 +10:00
teor
b2a9ea62fe
Round-trip the PoWLimit through the compact representation
...
`zcashd` converts the PoWLimit into a compact representation before
using it to perform difficulty filter checks.
The Zcash specification converts to compact for the default difficulty
filter, but not for testnet minimum difficulty blocks. (ZIP 205 and
ZIP 208 don't specify this conversion either.) See #1277 .
2020-11-12 12:30:54 +10:00
teor
8f838166a8
Make ExpandedDifficulty Debug byte order match Hash
...
Bugfix on PR #1171 .
2020-11-12 12:30:54 +10:00
teor
76a9f5b8c4
Refactor block target spacing into NetworkUpgrade methods
...
And add a method for the minimum difficulty time gap threshold.
2020-11-12 12:30:54 +10:00
teor
405c0644f9
Add a comment explaining the issues in ZIPs 205 and 208
...
And add the network to the difficulty filter error.
2020-11-12 12:30:54 +10:00
dependabot[bot]
a7ad73feac
build(deps): bump sled from 0.34.4 to 0.34.5
...
Bumps [sled](https://github.com/spacejam/sled ) from 0.34.4 to 0.34.5.
- [Release notes](https://github.com/spacejam/sled/releases )
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md )
- [Commits](https://github.com/spacejam/sled/compare/v0.34.4...v0.34.5 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-11-10 11:01:06 -05:00
teor
41788c3f27
Add metrics for the non-finalized state and queue ( #1263 )
2020-11-10 11:11:58 +10:00
Alfredo Garcia
128643d81e
Call `zebra_test::init` where needed. ( #1227 )
...
* Add missing `zebra_test::init()` to zebra-chain
* Add missing `zebra_test::init()` to zebra-consensus
* Add missing `zebra_test::init()` to zebra-network
* Add missing `zebra_test::init()` to zebra-state
* Add missing `zebra_test::init()` to zebra-test
* Add missing `zebra_test::init()` to zebrad
2020-11-10 10:29:25 +10:00