Commit Graph

228 Commits

Author SHA1 Message Date
Alfredo Garcia 65fa1c6bd9 replace canopy.pdf with protocol.pdf 2021-03-02 16:07:04 -05:00
teor 4a812af5d7 Move design/data-flow to rfcs/drafts 2021-03-01 17:58:50 -05:00
teor 9736abdf07 Update grafana instructions 2021-03-01 16:50:06 -05:00
teor 20486be042 Client design: add "one database per key" alternative 2021-02-16 23:25:45 -05:00
Deirdre Connolly 32ed09262d Stub out Sled trees for zebra-client / blockchain scanning state
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2021-01-08 19:02:40 -05:00
Deirdre Connolly 31421b55d3 Preallocate 0009 for Zebra Client RFC 2021-01-08 19:02:40 -05:00
Deirdre Connolly 62362ef31e Add more detail about the differences between this design and light client protocol
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2021-01-08 19:02:40 -05:00
Deirdre Connolly 5d45bd0116 Clarify that zebra-cli will wrap zebra-client, a library that implements wallet stuff
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2021-01-08 19:02:40 -05:00
Deirdre Connolly 6a4152fe6c Update PR link 2021-01-08 19:02:40 -05:00
Henry de Valence a6b07bdc3d client: further work on client RFC
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-01-08 19:02:40 -05:00
Deirdre Connolly 69a8107c86 Add wip rfc for zebra-client/cli design 2021-01-08 19:02:40 -05:00
Alfredo Garcia d725eeb4d6
Add documentation to zebra-utils and checkpoint generation (#1491)
* create readme for utils and checkpoints
* add link to checkpoint usage to book

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: teor <teor@riseup.net>
2020-12-14 11:34:22 +10:00
teor 621dc23082 Link to where the deployments docs will be 2020-12-07 21:11:24 -05:00
Pili Guerra 113c27196e Update alpha-release-criteria.md
Update after Team Sync on 2020.12.07
2020-12-07 21:11:24 -05:00
teor 81d19ca196
Move the system requirements to the README 2020-12-08 07:45:05 +10:00
teor d965a4cd24
Check crate versions before a release 2020-12-08 07:36:59 +10:00
teor c75a659d03
Update release criteria (#1469)
Add checkpoint list and known serious issues updates
Update statuses based on recent changes
2020-12-07 12:14:58 +01:00
teor e2792fa656
Add crate dependencies to the release checklist (#1459)
* Add crate dependencies to the release checklist

* Update "Last updated" date

Co-authored-by: Pili Guerra <pili@piliguerra.com>
2020-12-04 11:47:17 +01:00
Pili Guerra 19d25fb7be
WIP: First draft of alpha release criteria for review (#1374)
* WIP: First draft of release criteria for review

* Update release-criteria.md

Fix formatting

* Added more details to release criteria

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

* Add "Future Releases" section

* Remove Alpha Release criteria items

These should be included and expanded upon in future releases

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

* Formatting fixes

* Remove support and troubleshooting criteria from first alpha release

* Switching functionality criteria between future and alpha release

* Remove redundant statement from "Network Readiness" section for "Future Releases"

* Go/No-Go checklist should be a living document

Let's make this a living document by making it clear that this reflects the latest status as of the "Last updated" date

* Update release-criteria.md

Update status after Go/No-Go meeting

* Make RAG status symbols more accessible

* Update release-criteria.md

- Remove "Future Releases" section
- Clean up formatting

* Update book/src/dev/release-criteria.md

change "`zebrad` can validate proof of work" from green to amber

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

* Update book/src/dev/release-criteria.md

Change "Build completes within 30 minutes in Zebra's CI" from green to amber

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

* Update book/src/dev/release-criteria.md

Change "known panics, errors and warnings have open tickets" and "`zebrad` executes normally" form amber to green

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

* Rename release-criteria.md to alpha-release-criteria.md

We will have new release criteria for future releases

Co-authored-by: teor <teor@riseup.net>
2020-12-03 15:44:33 +01:00
teor fc7d37c984
RFC: Contextual Difficulty (#1246)
* Difficulty Contextual RFC: Introduction
Add a header, summary, and motivation

* Difficulty RFC: Add draft definitions
And update the state RFC definitions to match.

* Difficulty RFC: Add relevant chain
* Difficulty RFC: draft guide-level explanation
Outline the core calculations and checks.

* Difficulty RFC: Revised based on spec fixes
Update the design based on the spec bugs in #1276, #1277, and
zcash/zips#416.

These changes make the difficulty filter into a context-free check,
so we remove it from this contextual validation RFC.

* Difficulty RFC: Explain how Zebra's calculations can match the spec
* Difficulty RFC: write most of the reference section
Includes most of the implementation, modules for each function, and
draft notes for some of the remaining parts of the RFC.

* Difficulty RFC: Add an AdjustedDifficulty struct
* Difficulty RFC: Summarise module structure in the one place
* Difficulty RFC: Create implementation notes subsections
* Difficulty RFC: add consensus critical order of operations
* Difficulty RFC: Use the ValidateContextError type
* Difficulty RFC: make the median_time arg mut owned

We have to clone the data to pass a fixed-length array to a function,
so we might as well sort that array to find the median, and avoid a
copy.
2020-11-26 11:45:01 +10:00
Deirdre Connolly 2a21c86b91 I before E except after C (or uh, not-english) 2020-11-24 22:23:57 -05:00
teor d2173cae7e
Basic documentation for zebra-checkpoints (#1361) 2020-11-24 10:49:41 +10:00
Jane Lusby 4c9bb87df2
zebra-state: replace sled with rocksdb (#1325)
## Motivation

Prior to this PR we've been using `sled` as our database for storing persistent chain data on the disk between boots. We picked sled over rocksdb to minimize our c++ dependencies despite it being a less mature codebase. The theory was if it worked well enough we'd prefer to have a pure rust codebase, but if we ever ran into problems we knew we could easily swap it out with rocksdb.

Well, we ran into problems. Sled's memory usage was particularly high, and it seemed to be leaking memory. On top of all that, the performance for writes was pretty poor, causing us to become bottle-necked on sled instead of the network.

## Solution

This PR replaces `sled` with `rocksdb`. We've seen a 10x improvement in memory usage out of the box, no more leaking, and much better write performance. With this change writing chain data to disk is no longer a limiting factor in how quickly we can sync the chain.

The code in this pull request has:
  - [x] Documentation Comments
  - [x] Unit Tests and Property Tests

## Review

@hdevalence
2020-11-18 18:05:06 -08:00
teor 0dc38608ef Add missing anchors to the RFC template 2020-11-12 21:59:42 -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 74af22e5ca Add unit tests for 2020-11-12 09:14:52 -05:00
Jane Lusby 34f50d7ebb
Fix inconsistencies related to best chain order in RFC and state impl (#1267)
Prior to this PR we realized that the RFC had been drafted with the assumption that chains would be ordered from best to worst in `NonFinalizedState`. This assumption was incorrect, since `BTreeSet` only ever orders values in ascending order. This discrepancy was noticed and fixed in the code, but there were still some inconsistencies that needed to be cleaned up.

This PR updates all the incorrect or confusing comments about chain ordering in the RFC and code.
2020-11-09 15:53:16 -08:00
teor 9f261e2213 Fix options order in metrics docker commands
And use long-form command options for readability
2020-11-05 08:39:14 -05:00
teor 776e49ff0c State RFC: clarify difficulty
The difficulty validation RFC will introduce a definition of
per-block difficulty. Make it clear that the state RFC
definition is cumulative difficulty.
2020-10-30 19:12:32 -04:00
teor f338048012 Clarify edge case 2020-10-29 15:41:45 -04:00
teor b742657e45 State RFC: Clarify genesis sprout anchors 2020-10-29 15:41:45 -04:00
Alfredo Garcia 97c93daca7
Remove template section from Pipelinable Block Syncing RFC (#1219)
* remove template section and add summary
2020-10-29 20:10:17 +10:00
teor b4ce442cea
State RFC: Use escaped concatenation operator
And use BE32 consistently
2020-10-27 20:50:29 +10:00
teor adbdb3c76e
Note that `blocks_by_height` is also a bijection 2020-10-27 20:13:49 +10:00
teor 7ea92283a7
Fix a State RFC rendering issue 2020-10-27 20:07:43 +10:00
teor 08910e0378
State RFC: fix block height contextual validation 2020-10-27 19:29:32 +10:00
Jane Lusby 971765ab30
Handle duplicate blocks in zebra-state (#1198)
## Motivation

The zebra-state service needs to be able to handle duplicate blocks.

## Solution

This implements changes already outlined by [The State
RFC](https://zebra.zfnd.org/dev/rfcs/0005-state-updates.html). We check for
successfully committed blocks first, since interacting with the queued blocks
struct at this point just complicates the implimentation. If the block has not
already been committed we then check if the block has already been queued, if
not we handle the block normally (normally here being the bit we already had
implemented).

## Documentation Changes

- [x] Update the state RFC to match the ways this fix departs from the design
	- the main thing is that I switched the order of checking for duplicates
- [x] ~~Add newly added functions to the state rfc~~ Decided not to do this because they're minor getters that don't influence the rest of the design and aren't exposed as part of the API
- [x] Document newly added functions inline

## Testing

## Related Issues

- fixes https://github.com/ZcashFoundation/zebra/issues/1182
- tracking issue https://github.com/ZcashFoundation/zebra/issues/1049

Co-authored-by: teor <teor@riseup.net>
2020-10-26 13:54:19 -07:00
teor fb079c2ca1
Replace BlockHeaderHash with block::Hash 2020-10-26 22:27:57 +10:00
teor a9102e8d6d
Fix State RFC rendering ambiguities 2020-10-26 22:02:45 +10:00
teor 0935b3305a
Fix more state RFC function heading sizes 2020-10-26 21:14:14 +10:00
teor 7bf2fdd6d7
Fix a header level in the state RFC 2020-10-26 21:11:26 +10:00
teor 90e755472c Add data source instructions to the metrics help 2020-10-23 15:06:37 -04:00
teor b492cabeee Bind grafana to localhost in metrics instructions
Binding grafana to localhost makes it inaccessible from the wider internet,
which is a secure default.

Since we run docker with host networking, docker containers have access to D-Bus and other
security-related services on localhost. So it's risky to also expose them to the wider internet.
2020-10-23 15:06:37 -04:00
Alfredo Garcia 21ad6ffc47
Reverse displayed endianness of transaction and block hashes (#1171)
* Reverse displayed endianness of transaction and block hashes
* fix zebra-checkpoints utility for new hash order
* Stop using "zebrad revhex" in zebrad-hash-lookup
* Rebuild checkpoint lists in new hash order
This change also adds additional checkpoints to the end of each list.

* Replace TransactionHash with transaction::Hash
This change should have been made in #905, but we missed Debug impls
and some docs.

Co-authored-by: Ramana Venkata <vramana@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2020-10-22 07:54:02 +10:00
teor 351e5013ae
Expand the template testing section (#1157)
Based on team discussions
2020-10-14 12:08:52 -07:00
teor 691ad12cc9
Add modules and test plans to the RFC template (#1145) 2020-10-12 12:46:52 -07:00
teor fd0fac3a61
State RFC: Handle duplicate block edge cases (#1136)
Handle the following duplicate block edge cases:
* duplicate in finalized state
* duplicate in queue

* Handle the broadcast channel correctly
2020-10-10 11:50:12 +10:00
Jane Lusby 855f9b5bcb
Implement MVP of NonFinalizedState and integrate it with the state service (#1101)
* implement most of the chain functions
* implement fork
* fix outpoint handling in Chain struct
* update expect for work
* split utxo into two sets
* update the Chain definition
* remove allow attribute in zebra-state/lib.rs
* merge ChainSet type into MemoryState
* Add error messages to asserts
* export proptest impls for use in downstream crates
* add testjob for disabled feature in zebra-chain
* try to fix github actions syntax
* add module doc comment
* update RFC for utxos
* add missing header
* working proptest for Chain
* propagate back results over channel
* Start updating RFC to match changes
* implement queued block pruning
* and now it syncs wooo!
* remove empty modules
* setup config for proptests
* re-enable missing_docs lint
* update RFC to match changes in impl
* add documentation
* use more explicit variable names
2020-10-08 13:07:32 +10:00
Dimitris Apostolou 36279621f0 Fix typos 2020-10-06 12:16:41 +10:00
teor b05273ac16
State RFC: remove duplicate validation steps (#1123) 2020-10-05 19:03:17 -07:00
Jane Lusby 86ed13060f
Add tests for `Chain` implementation (#1093)
* Begin work on RFC5 implementation

* I think this is necessary

* holy shit supertrait implemented via subtrait

* implement most of the chain functions

* change to slightly better name

* implement fork

* fix outpoint handling in Chain struct

* update expect for work

* resolve review comment

* split utxo into two sets

* update the Chain definition

* just a little more

* update comment

* Apply suggestions from code review

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

* apply changes from code review

* remove allow attribute in zebra-state/lib.rs

* Update zebra-state/src/memory_state.rs

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

* merge ChainSet type into MemoryState

* rename state impl types

* Add error messages to asserts

* checkpoint so I can split off arbitrary changes into a PR

* export proptest impls for use in downstream crates

* add testjob for disabled feature in zebra-chain

* run rustfmt

* try to fix github actions syntax

* differentiate name

* prove that github action tests zebra-chain build without features

* revert change from last commit now that test is running

* remove accidentally introduced newline

* checkpoint

* add module doc comment

* update RFC for utxos

* add missing header

* working proptest for Chain

* apply change from chain impl PR

* setup config for proptests

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

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

* run rustfmt

Co-authored-by: teor <teor@riseup.net>
2020-10-02 15:51:51 -07:00
teor 5ed27dc8a1 State RFC - handle duplicates of finalized blocks 2020-09-29 12:19:56 +10:00
teor df9252c759 Refactor out push_block_on_chain
And tidy up some error handling and panics
2020-09-29 12:19:56 +10:00
teor b264e24cd0 Panic on all commit_block errors 2020-09-29 12:19:56 +10:00
teor 2d183cbff3 Tweak State RFC to handle edge cases
* Reject CommitBlock with pre-sapling blocks: they must use CommitFinalizedBlock
* Clarify adding a new Chain to an empty ChainSet
* Handle duplicate blocks correctly
2020-09-29 12:19:56 +10:00
Jane Lusby 352721bd88
Implement RFC5: State updates `Chain` type (#1069)
* Begin work on RFC5 implementation

* I think this is necessary

* holy shit supertrait implemented via subtrait

* implement most of the chain functions

* change to slightly better name

* implement fork

* fix outpoint handling in Chain struct

* update expect for work

* resolve review comment

* split utxo into two sets

* update the Chain definition

* just a little more

* update comment

* Apply suggestions from code review

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

* apply changes from code review

* remove allow attribute in zebra-state/lib.rs

* Update zebra-state/src/memory_state.rs

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

* merge ChainSet type into MemoryState

* rename state impl types

* Add error messages to asserts

* add module doc comment

* update RFC for utxos

* add missing header

Co-authored-by: teor <teor@riseup.net>
2020-09-24 15:46:04 -07:00
Henry de Valence 16cc095484
RFC: state updates (#902)
* wip

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

* wip2: add nullifiers

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

* Update book/src/dev/rfcs/0003-state-updates.md

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

* Move to RFC number 5

* rfc: add PR link to state update RFC

* rfc: change state RFC to store blocks by height.

The rationale for this change is described in the document: it means
that we write blocks only to one end of the Sled tree, and hopefully
helps us with spatial access patterns.

This should help alleviate a major cause of memory use in Zebra's
current WIP Sled structure, which is that:

- blocks are stored in random, sparse order (by hash) in the B-tree;
- the `Request::GetDepth` method opens the entire block store and
  queries a random part of its block data to determine whether a hash is
  present;
- if present, it deserializes the complete block data of both the given
  block and the current tip block, to compute the difference in block
  heights.

This access pattern forces a large amount of B-tree data to remain
resident, and could probably be avoided if we didn't do that.

* rfc: add sprout and sapling anchors to sled trees.

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* rfc: fill in details of state service requests.

* rfc: extract commit process from API description

* rfc: add anchor parameters to CommitBlock.

These have to be computed by a verifier, so passing them as parameters
means we don't recompute them.

* WIP for in memory state structs

* tweeks from end of session with henry

* more updates from pairing

* rewrite non-finalized state sections

* update query instructions for each request

* more updates

* updates from pairing with henry

* updates from proofreading solo

* add guide level explanation to state rfc

* add drawbacks section

* Update book/src/dev/rfcs/0005-state-updates.md

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

* Apply suggestions from code review

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

* Update book/src/dev/rfcs/0005-state-updates.md

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

* apply changes from code review

* clarify iteration

* Apply suggestions from code review

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

* apply changes from code review

* Update book/src/dev/rfcs/0005-state-updates.md

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* Apply suggestions from code review

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

* add info about default constructing chains when forking from finalized state

* Update book/src/dev/rfcs/0005-state-updates.md

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

* move contextual verification out of Chain

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-09-21 12:05:31 -07:00
Henry de Valence 1d0ebf89c6 zebrad: move seed command into inbound component
Remove the seed command entirely, and make the behavior it provided
(responding to `Request::Peers`) part of the ordinary functioning of the
start command.

The new `Inbound` service should be expanded to handle all request
types.
2020-09-18 18:34:25 -07:00
Jane Lusby 3c40eddc17 Update book/src/dev/rfcs.md 2020-09-17 13:23:58 -07:00
noone 92f3ae2c00 Linkify the reference to the rust RFC process so readers can read up on it easily. 2020-09-17 13:23:58 -07:00
Alfredo Garcia 454e75e7c0
Rename old references to BlockHeaderHash and BlockHeight (#1002)
* rename some references

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: teor <teor@riseup.net>

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: teor <teor@riseup.net>
2020-09-04 15:40:48 -07:00
Henry de Valence e1e299906f rfc: add number to script verification rfc 2020-08-31 00:58:50 -04:00
Henry de Valence b212becb67 Add issue and PR templates, document RFC process 2020-08-31 00:58:50 -04:00
Deirdre Connolly 50af921d5d Use zebra favicon for zebra.zfnd.org book 2020-08-29 03:33:31 -04:00
Henry de Valence 4561f1d25b
rfc: initial inventory tracking (#952)
* rfc: initial inventory tracking

This just describes the design, not the design alternatives.

* rfc: finish inventory tracking rfc

Also assign it #3.  The async script verification RFC should have had a number
assigned before merging but it didn't.  I don't want to fix that in this PR
because I don't want those changes to block on each other.  The fix is to (1)
document the RFC flow better and (2) add issue templates for RFCs.

* rfc: touch up inventory tracking rfc

* rfc: prune inventory entries generationally.

Based on a suggestion by @yaahc.

* Update book/src/dev/rfcs/0003-inventory-tracking.md

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-28 14:19:18 -07:00
Henry de Valence dda0d2dd41 Remove check_block
Per discussion where @yaahc suggested that it would be simpler to delete this function entirely and treat it as an implementation detail.

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-21 16:38:33 -04:00
Jane Lusby 7dcac97d0b Update book/src/dev/rfcs/XXXX-asynchronous-script-verification.md
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-08-21 16:38:33 -04:00
Henry de Valence a3a4ba858a Add async script RFC 2020-08-21 16:38:33 -04:00
teor 120c7ef648
rfc: Parallel Verification (#763)
* rfc: Parallel Verification Draft

An initial draft RFC for parallel verification.

* rfc: Integrate the CheckpointVerifier design

Describe how the CheckpointVerifier interacts with chain state updates.

* rfc: Add a chain tips update service

* rfc: Add network upgrade context changes

* rfc: Add main chain tip section

* rfc: Clarify and expand genesis block rules

* rfc: More genesis special cases

* Add another chain tips edge case

* Remove the final tie-breaker for tip ties

Instead, change the design to make them impossible.

* rfc: add a definitions section to parallel verification

* rfc: Split parallel verification into two RFCs

This is the semantic verification RFC.

* rfc: Add guide and examples for parallel verification

* rfc: Fix GitHub markdown

* rfc: Fix parallel function design

We don't need separate functions, we can just do the awaits as late as
possible.

* rfc: Fix typo

* rfc: Stop assigning responsibilities to modules

* rfc: Add more parallel verification definitions

* rfc: Say "block height consensus rule"

* rfc: Tidy some of the TODOs

* rfc: Expand rationale and alternatives

* rfc: Delete "try to depend on older blocks"

* rfc: Delete coinbase checks which are unrelated to BlockHeight

And remove some duplicate references to BlockHeight checks.

* rfc: Focus on verification stages

And rewrite some stages for clarity.

* rfc: Remove reference to zebra-network
2020-08-14 11:04:17 -07:00
teor aa922564b4
rfc: Update the RFC template to talk about testing and maintenance (#875) 2020-08-11 13:26:35 -07:00
Jane Lusby a6b9de6938
Add a definitions section to our RFC template (#846)
* Add a definitions section to our RFC template

* Update 0000-template.md
2020-08-07 13:29:00 -04:00
Henry de Valence bdf66387d6
Reorganize the book. (#843)
* Reorganize the book.

This PR has one unfortunate change, which is that the README.md and
CONTRIBUTING.md files in the book are symlinks to files in the parent
directory.  The motivation for this is to ensure that we don't maintain two
copies of the same data, and that the landing page of the website matches the
landing page of the Github repo, etc.   However, I'm not sure whether these
symlinks will work correctly on Windows.

The alternatives are:

- Duplicate the contents of the files and expect that people will know to keep
  them in sync;

- Use relative links `../../README.md` in the `SUMMARY.md`.  This seemed like
  it caused mdbook to dump the rendered files into the repository root rather
  than keeping them in the `book` directory.

- Use a symlink (chosen option).  This may not work on Windows but I think that
  the worst outcome would be that the book would be unbuildable unless someone
  used WSL or something.  This seems like the least bad option.

* Remove symlinks in favor of #include 

Turns out the symlinks aren't required!
2020-08-06 15:39:54 -07:00
Jane Lusby 867dd0b475
Setup tracing-flame for use profiling zebrad (#436)
* Setup tracing-flame for use profiling zebrad

* start work on conditional flamegraph generation

* review time!

* update comments

* Update Cargo.toml

* disable default features for inferno

* reorganize

* missing one trait

* Apply suggestions from code review

* graceful shutdown!

* remove special case handling on ctrlc for cleanup

* rename signal fn to better represent its responsibility

* remove unused global hook for flushing flamegraph

* move tracing logic to the right file

* just copy linkerd's signal handling logic

* update book

* make zebrad app drop on shutdown normally

* Update zebrad/src/components/tokio.rs

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

* Update zebrad/src/application.rs

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

* Apply suggestions from code review

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

* cleanup a little

* ooh yea there's an API for that

* setup env-filter for backup subscriber

* document env filter

* document return codes

* forgot to save

* Update book/src/applications/zebrad.md

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

Co-authored-by: teor <teor@riseup.net>
2020-08-05 16:35:56 -07:00
Henry de Valence 4a03d76a41
Remove environment variables in favor of documented config options. (#827)
* Load tracing filter only from config and simplify logic.

* Configure the state storage in the config, not an environment variable.

This also changes the config so that the path is always set rather than being
optional, because Zebra always needs a place to store its config.
2020-08-05 11:48:08 -07:00
Alfredo Garcia 89ef08793b delete file 2020-07-29 19:44:21 -07:00
Alfredo Garcia 617f1d80ef move docs to zebra book 2020-07-29 19:44:21 -07:00
teor 0ef8e38266 fix: Tweak the RFC template
* replace references to "(Rust) language" with Zebra, Zcash or project as appropriate
* talk about impacts on the broader ecosystem
2020-07-29 11:32:24 +10:00
Jane Lusby e06357f795
Add skeleton of eventual zebra book (#653)
* Add skeleton of eventual zebra book

* reorg sections

* restore file and reorg book a little

* try setting up a firebase deployment

* allow firebase ci to work on test

* download mdbook

* fix book path

* use newer version of mdbook

* remove event hook for book branch pre merge

* Apply suggestions from code review

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-07-17 20:15:50 -07:00