Commit Graph

820 Commits

Author SHA1 Message Date
Deirdre Connolly eff8a3889e Revert "Sign container images for later binary authorization"
This reverts commit 0bb8b2b059.
2020-06-25 17:03:07 -04:00
Deirdre Connolly 038a09ad36 Revert "Use gcloud sdk latest stable in actions; use --quiet for alpha commands"
This reverts commit 8367c765a0.
2020-06-25 17:03:07 -04:00
Deirdre Connolly 839d4ab9fb Revert "Move --quiet around"
This reverts commit 01e6d01d9b.
2020-06-25 17:03:07 -04:00
Deirdre Connolly e8ff7a1dd8 Revert "Verify that the attestation was created"
This reverts commit c1f97e21c9.
2020-06-25 17:03:07 -04:00
Deirdre Connolly c1f97e21c9 Verify that the attestation was created 2020-06-25 16:47:29 -04:00
Deirdre Connolly 01e6d01d9b Move --quiet around 2020-06-25 16:47:29 -04:00
Deirdre Connolly 8367c765a0 Use gcloud sdk latest stable in actions; use --quiet for alpha commands 2020-06-25 16:47:29 -04:00
Deirdre Connolly 0bb8b2b059 Sign container images for later binary authorization 2020-06-25 16:47:29 -04:00
Alfredo Garcia 9cbd369a59
Refactor block module to have submodules (#512)
* create hash submodule for block

* create header submodule for block

* create serialize submodule for block

* add newline to hash.rs (fmt)

* Update zebra-chain/src/block/tests.rs

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-06-25 09:18:05 -07:00
teor a706b65325
Consensus test tweaks (#538)
* Use spandoc correctly
* Refactor consensus test error handling
* Delete a checkpoint test that will soon be obsolete

* Only initialise tracing once for the block tests
* Use tracing in the checkpoint tests

* Move BlockVerifier and tests into block.rs

* Update a BlockVerifier comment
* Tweak some TODO comments
2020-06-25 10:14:23 +10:00
Henry de Valence 21bf913b48 Revert "correctly trim and download tips (#531)"
This reverts commit e102bd5e34.
2020-06-24 12:24:37 -07:00
Jane Lusby e102bd5e34
correctly trim and download tips (#531)
* also download tips and filter tips

* dispatch all block downloads together

* tweek to match henry's changes

* switch to more intuitive match

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-24 15:19:34 -04:00
Jane Lusby 2abf4b93a8 consolidate test init functions into zebra-test (#541)
* consolidate test init logic into one place

* rustfmt

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-24 11:47:18 -07:00
Henry de Valence 87a8d328d5 Rewrite zebra-state tests to use transcripts.
This makes adding more tests easier.
2020-06-24 11:47:18 -07:00
Henry de Valence e8d42264e8 Add a check method to the Transcript. 2020-06-24 11:47:18 -07:00
Henry de Valence 5c9cd52baf Add a Transcript Service for testing. 2020-06-24 11:47:18 -07:00
teor a9efb8715e chain: Update the note about time truncation 2020-06-24 18:22:36 +10:00
teor f40bfff7c0 consensus: Simplify error handling in a test
Part of #477.
2020-06-24 18:22:36 +10:00
teor f1ce4dcf14 consensus: Inline node_time_check() into callers
node_time_check() is a small function, so we inline it into its callers.
(And then rename node_time_check_helper() to node_time_check().)

Part of #477.
2020-06-24 18:22:36 +10:00
teor 59bc8d7167 consensus: Make BlockVerifier only call AddBlock on success
We don't want to call the state's AddBlock until we know the block is
valid. This avoids subtle bugs if the state is modified in call().

(in_memory currently modifies the state in call(), on_disk modifies the
state in the async block.)

Part of #477.
2020-06-24 18:22:36 +10:00
teor 8fde8c1a6b consensus: Add tests for block node time checks
Part of #477.
2020-06-24 18:22:36 +10:00
teor a41f4f68cf consensus: move verify::block to its own file
Part of #477.
2020-06-24 18:22:36 +10:00
teor d97c769869 consensus: Refactor the node time check for testing
Part of #477.
2020-06-24 18:22:36 +10:00
teor 3f5e2695e3 chain: Tweak the version and time test bounds
Use MAX constants for the block header version and time arbitrary test
ranges. Reduces the block header time arbitrary test range from 2**32 to
2**32-1 (u32::MAX). (2**32 is an invalid time value, which gets
truncated to 0 during serialization.)

Also add some comments about DateTime conversions.

Part of #477.
2020-06-24 18:22:36 +10:00
teor 3c27c11012 consensus: Check block times against the local clock
Part of #477.
2020-06-24 18:22:36 +10:00
teor f10bfd5806 consensus: Add a block time check function
Add a function that checks the block header miner times against the
node's local clock.

(We'll use this function in the next commit.)

Part of #477.
2020-06-24 18:22:36 +10:00
teor 719aa75581 chain: Add a comment about transaction sizes
We don't need to check transaction sizes yet, because we aren't
parsing or generating transactions outside of blocks.

Part of #483.
2020-06-24 18:22:36 +10:00
Alfredo Garcia 67718898c5
add usage help to generated config (#527) 2020-06-23 11:56:00 -07:00
Henry de Valence a453edd91c Put type definitions back at the bottom of the file. 2020-06-23 10:16:27 -07:00
Henry de Valence 18eb212d8e Set the new tips to be the last, not first, hash. 2020-06-23 10:16:27 -07:00
Henry de Valence 70241d3cad Fix broken git dependencies.
Pinning hashes means these won't break again in the future; they can always be updated.
2020-06-22 20:23:02 -07:00
Henry de Valence e8561d8f9e rename zebra-test-vectors to zebra-test 2020-06-22 20:23:02 -07:00
Jane Lusby 1c42b66a4f
Implement sync component for start subcommand (#506) 2020-06-22 19:24:53 -07:00
teor 03b8453b8a
Checkpoint Verifier Tests (#517)
* Add basic checkpoint verifier tests
* Refactor a checkpoint verifier condition
* Remove some outdated comments
2020-06-23 12:15:37 +10:00
Jane Lusby 246e7cd2a9
Start testing out new version of `eyre` and `color-eyre` in zebra (#526)
* port to new version of eyre without generics

* correctly setup color_eyre hooks

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-22 15:36:23 -07:00
dependabot[bot] f301de41fa Bump tracing-subscriber from 0.2.5 to 0.2.6
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.5 to 0.2.6.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber/-0.2.5...tracing-subscriber-0.2.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 12:01:47 -04:00
dependabot[bot] e3ad9737e7 Bump sled from 0.31.0 to 0.32.0
Bumps [sled](https://github.com/spacejam/sled) from 0.31.0 to 0.32.0.
- [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.31...v0.32)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 12:00:54 -04:00
dependabot[bot] bf779ea1d6 Bump serde from 1.0.112 to 1.0.114
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.114.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.114)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 11:58:09 -04:00
dependabot[bot] 5c0df915f1 Bump w9jds/firebase-action from v1.3.1 to v1.5.0
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from v1.3.1 to v1.5.0.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v1.3.1...6d1a577caffa15dfad8cc3d95e8ea2ac7ff51f7f)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 11:55:43 -04:00
teor d8b48f885b
consensus: Add a checkpoint verifier stub (#502)
consensus: Add a checkpoint verifier stub

This stub only verifies blocks whose hashes are in the checkpoint
list.

It doesn't have tests, chain child verifies to their ancestors, or
support checkpoint maximum height queries.

Part of #429.
2020-06-22 08:51:43 +10:00
Deirdre Connolly 2bdd07c1bc
Create instance group if it doesn't exist, update it if it does (#513)
* Deploy instance group if it doesn't exist, update it if it does

* Rename push.yml to cd.yml

* Rename some CD steps
2020-06-21 04:39:47 -04:00
dependabot[bot] 6324ad8828 Bump bytes from 0.5.4 to 0.5.5
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-19 12:56:38 -04:00
Deirdre Connolly 2f87a9a9f6 Update existing managed instance groups on deploy 2020-06-19 03:46:09 -04:00
Deirdre Connolly 509f0763ad Scope deploys to main, gcloud branches; shorten initial delay 2020-06-19 03:46:09 -04:00
Deirdre Connolly c901b42c75 Shorten health check delay from 3 minutes to 1 2020-06-19 03:46:09 -04:00
Deirdre Connolly 05316dee21 Listen on 0.0.0.0, not 127.0.0.1
Turns out when your node faces the internet directly, it has to listen
to those addresses directly.
2020-06-19 03:46:09 -04:00
Deirdre Connolly e6d986a057 Put all ports EXPOSE'd on the same line 2020-06-19 03:46:09 -04:00
Deirdre Connolly c85acde18f Add 'zebrad' tags to instance templates
And add 'one time' commands commented out for managing firewall rules.
2020-06-19 03:46:09 -04:00
Deirdre Connolly f95e7d5595 Add health check 2020-06-19 03:46:09 -04:00
Deirdre Connolly 4aabadc67d Remove zone param 2020-06-19 03:46:09 -04:00