The `runtime-entrypoint.sh` uses the `RPC_PORT` env var when the user
specifies the `getblocktemplate-rpc` feature, but this env var is unset
unless the user sets it. This commit sets the default values for
`RPC_PORT` depending on `NETWORK`.
* Adds most_recent_by_ip field to address book
* adds test
* Apply suggestions from code review
* fixes lint
* Updates most_recent_by_ip in .take()
Updates should_update_most_recent_by_ip() and has_active_peer_with_ip to check last_attempt and last_failure times
Renames has_active_peer_with_ip
* Documents that Zebra will not initiate more than 1 outbound connections per IP
* Fixes is_ready_for_connection_attempt_with_ip
Adds test coverage for AttemptPending and Failed
Fixes new_outbound_peer_connections_are_rate_limited proptest
* Applies suggestions from code review.
* Applies suggestions from code review
* Always return true from `is_ready_for_connection_attempt_with_ip` if max_connections_per_ip != 0
* Update max_connections_per_ip config docs
* Warn about invalid config fields and use default values
* Ignores last_attempt and last_failure in is_ready_for_connection_attempt_with_ip
updates test
* Only update most_recent_by_ip if update.last_conn_state is responded.
* Apply suggestions from code review
Co-authored-by: teor <teor@riseup.net>
* fixes lint
* Update zebra-network/src/address_book.rs
Co-authored-by: teor <teor@riseup.net>
* Apply suggestions from code review
Co-authored-by: teor <teor@riseup.net>
* Fix Rust syntax
* Fix whitespace
---------
Co-authored-by: teor <teor@riseup.net>
* Add an assert_frontier_eq() method to note commitment trees for tests
* Check round-trip serialization for note commitment trees
* fix typos
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* Remove duplicate "running" message, send log file opening logs to stderr
* Add missing block progress bar desc, make them consistent
* Put progress bars in a specific order in each section
* Actually make block progress bar desc consistent
* Make progress bar order even more consistent
* Fix fork blocks plural for 1 block
* Use the correct number of chain fork bars
* Disable confusing partial work display
* Add struct field category comments
* Silence a verbose inventory log
* claridy some checkpoint verifier docs
* update documentation of `Request::CommitSemanticallyVerifiedBlock` and `Request::CommitCheckpointVerifiedBlock`
* replace `prepared` with `semantically_verified` in state service checks code
* replace `non-finalized` where needed in docs of the state service
* fix double space in doc
* replace `finalized` where needed in docs of the state service
* change some docs in state queued_blocks.rs
* Rewrite pending UTXO checkpoint block comment
* Fix trailing space in docs
* Apply suggestions from code review
Co-authored-by: teor <teor@riseup.net>
---------
Co-authored-by: teor <teor@riseup.net>
* Activate production features on docs.rs
* Make version requirements more flexible to work around unpublished versions
* Remove a redundant feature requirement that causes publishing issues
* fix release auto-replacement format
* cargo release replace --verbose --execute --package zebrad
* Add a missing 1.0.1 changelog entry
* Fix incorrect commands in the release checklist
* Check the crates.io release script in CI, to avoid release failures
* Fix release date in changelog
* Fix workflow typo
* Add --no-confirm to the workflow
* Fix outdated version in release check command
* After the release, add a "remove do-not-merge" step
* Set git identity before committing
* Don't overwrite tweaked versions on upgrade
* cargo release version doesn't support --dependent-version
* Update the same commands in the release checklist
* Commit to git after each change
* And in the checklist
* Add cargo release config
* In CI, allow any branch and provide a fake previous tag name
* Remove redundant `cargo release commit`
* Use a simpler release version process
* Start simplifying the release dry run in CI
* Fix a cargo dependency lint
* just skip the failing crates for now
* Fix the release checklist to match CI
* Use the latest versions of all Zebra dependencies
* Update license description in README for MIT-only crates
* Draft changelog with trivial issues
* Remove trivial issues
* Update changelog entries as of commit 2a31972 and PR #7103
* Update mainnet and testnet checkpoints as of 2023-06-30
* chore: Release
* Estimate release height for Zebra v1.0.1
Block height 2139118 at 2023-06-30 01:55:38 UTC
Release is likely to be 2023-07-01
2139118 + 1152 * 3 = 2142574
Then round up to the nearest 1000.
* Stop busy-waiting in a Future for 45 seconds every minute
* Use the correct elapsed time calculation
* Add some TODOs for making the structure of the loop and wait times clearer
* fix(docker): use `entrypoint.sh` as default for users
* ref(entrypoint): allow more flexible configurations
This changes allow users to:
- Mount their own configuration file
- Allow for Zebra to be exposed outside the container or not
- Allow the user to turn off sync
- Allow to enable `metrics` and `tracing`, exposing them or not
Having the `-x` option prints variable expasions, so we don't have to echo each value.
* chore(docker): remove unused ARGs from the Dockerfile
ARGs are not available at build time, so we don't require this ARGs as their ENV variables counterparts are being set in the `entrypoint`, at runtime.
* revert: keep old naming
* fix: renaming mistake :)
* Apply suggestions from code review
Co-authored-by: teor <teor@riseup.net>
* fix(docker): revert some breaking changes
* imp(docker): allow more flexibility with FEATURES config
* chore(docker): remove confusing port on `EXPOSE`
* chore(docker): remove unused command
* fix(docker): handle quotes while building the conf file
---------
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add methods for loading entire column families from the database
* Add a method that loads all the sprout trees from the database
* Add snapshot tests for sprout note commitment trees
* Add round-trip proptests for tree root database serialization
* Add a manual sprout note commitment tree database serialization snapshot test
* Add tests for 1,2,4,8 note commitments in a tree
* Remove redundant "rand" package rename in dependencies
* Randomly cache roots rather than only caching even roots
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add and use `FinalizableBlock`
This commit adds `FinalizableBlock`, and uses it instead of
`ContextuallyVerifiedBlockWithTrees` in `commit_finalized_direct()`
* Use `ContextuallyVerifiedBlockWithTrees`
This commit passes `ContextuallyVerifiedBlockWithTrees` instead of
passing separate `finalized`, `history_tree` and `note_commitment_trees`
when storing blocks in the finalized state.
* Apply suggestions from code review
Co-authored-by: teor <teor@riseup.net>
* add docs to new methods
* fix existing doc
* rename `ContextuallyVerifiedBlockWithTrees` to `SemanticallyVerifiedBlockWithTrees`
* Refactor docs
* Refactor comments
* Add missing docs, fix typo
* Fix rustfmt
---------
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>