Conversation
c795b55 to
ec5ba09
Compare
These typos are blocking the Nix typo CI in bitcoindevkit#1257
ec5ba09 to
7ab583b
Compare
028caa9 fix(typos): existant -> existent (Jose Storopoli) Pull request description: ### Description These typos are blocking the Nix typo CI in #1257 ### Notes to the reviewers Blocking #1257 ### Changelog notice - fix: typos in documentation - ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK 028caa9 Tree-SHA512: 0bd91efd0eec55fdc537824435552c968858a5b827179b3f9f3f37785db3fa92d3e6f0c73023de0c506224c81217c402d5afa8a2f768fecaf6a3c8378226d184
77e177c to
2a488e4
Compare
37f31d7 to
69df634
Compare
|
How does one update the CargoMSRV.lock file? After the version of bip39 in the root Cargo.toml file changed to 2.0, I encounter an error when running It appears to involve the 1.2.0 version that's in CargoMSRV.lock. I tried changing the version to 2.0.0 in the root Cargo.toml I ran the command I tried removing this lock file, and that didn't work either. I'm relatively new to nix. Perhaps instructions on handling such version updates in Cargo.toml that involve CargoMSRV.lock would be helpful in the NIX.md file. Here is the code I started with, rebased to include recent commits to master |
|
It is not that trivial.
I am planning to fix this and rebase today. |
|
Thanks, @storopoli ! |
69df634 to
2105f99
Compare
|
Last night I ran It ran successfully, except for one set of errors in the middle. I am attaching those errors, from somewhere in the middle of the console output, and a warning at the end of the console output showing which systems were not tested.
The errors were all of the form
Here are the details of my x86-64 system - Operating System - NixOS 24.05 (Uakari) It's amazing what ground that flake covers! |
|
these are http errors in the cargo-audit check. I am running these fine in my local machine and also in GitHub CI. |
These errors might be normal/to be ignored. The BTW. In Fedimint we run the audit by updating the input to the latest version and then doing the update, to always get the audit against current advisories. https://github.com/fedimint/fedimint/blob/59a88ce18c1721acec0db89c6bb97d9ea18af0d9/.github/workflows/ci-nix.yml#L169 |
2105f99 to
4853dde
Compare
Thanks for the tip I added this as well to our CI yml file |
4853dde to
1921e8b
Compare
e5868a1 to
9800282
Compare
More caught on by Nix CI in bitcoindevkit#1257.
9800282 to
dccc4ff
Compare
8d93fad chore: typos (Jose Storopoli) Pull request description: More caught on by Nix CI in #1257. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: evanlinjin: ACK 8d93fad notmandatory: ACK 8d93fad Tree-SHA512: 28e0316d457658266b2af1de76b114f87ce7485e386ddecd805dda1266a4e8645612c0fa6bc921c58daa4886558b32b538cccbb1644c96c3bab638dd7c42ee2b
dccc4ff to
d09f075
Compare
ci: update Flake.lock automatically ci: test electrsd with optional download ci: bitcoind no download option for Nix build ci: esplora pkg fix(readme): add explainer about external deps ci: add cachix cache ci(nix): add rust audit capabilities ci: WASM checks ci(nix): add code coverage ci(nix): add rust nightly docs ci(nix): pre-commit-checks with typos fixed chore: add Nix instructions ci(nix): pin crane ci: remove `--keep-failed` in CI ci(nix): refactor checks ci: use cargo ci profile for build deps feat(flake): update pkgs to 23.11 and pin bitcoind to 0.25
d09f075 to
6307ea1
Compare
Description
This would make all the tests possible to run locally. It enhances developer experience and facilitates onboarding of new contributors.
(Updated MSRV to 1.63)
Additions:
rustsec/advisory-db.cargo {check,build,test}in the whole workspace.Superseds
.github/workflows/audit.yml.NIX.mdCloses bitcoindevkit/bdk_wallet#129. Superseds #1122, #1156, #1165.
Pinneds Dependencies:
bitcoind: pinned to 0.25.0 in nixpkgs.electrs: pinned toBlockstream's esplorausing the Fedimint deployment, check jkitman/nixpkgs@61ccef8 and https://github.com/fedimint/fedimint/blob/master/flake.nix#L5TODO:
Fix
llvmdeps.Fix
opensslerrors.Fix dependencies on MacOS.
Fix
WASM.Fix
MSRV.Add a custom
CargoMSRV.lock? (Or maybe aCargoMSRV.tomlwith the pinned MSRV dependencies and thencargo generate-lockfilewith Rust MSRV?)Depends on solving fix: build
crane-utilsusing a different toolchain ipetkov/crane#422move all the logic from
cont_integration.ymltoflake.nix(all thecargo update -p)From the Fedimint suggestion we'll use
crane.This would allow caching of a lot of things
Then the user would call
nix buid -L .#MSRV --keep-failedand so on.This would also eliminate all the multiple
runs-onincont_integration.ymlto a single one where each step would be anameandrunthenix buildcommand.Add
DeterminateSystems/magic-nix-cache-actionto cache stuff in CI.Update
CONTRIBUTINGwith instructions. Use fedimint instructions for inspiration.nix develop:default: Rust latestMSRVWASMnix flake check:clippy
audit
rustfmtRust latest
test--all-features--no-default-featuresMSRV
test--all-features--no-default-featuresWASM (
--target wasm32-unknown-unknown)test-p bdk --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown,dev-getrandom-wasm-p esplora --target wasm32-unknown-unknown --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown,asynccachix/pre-commit-hooks.nixcommitizenrustfmtAdd a CI to update(is this possible?)Cargo.lockAdd a CI to update
flake.lockDelete
.github/workflows/audit.ymlPort Code Coverage to Nix
Nixify the Nightly Docs CI
Add
numtide/devshellClean up commit messages (this is a mess of squash fixup and ammends 😂)
Nix Commands
nix flake show: show all possible commands from the flake.nix develop: creates adevShellwith all the things you need to develop installed.Also handles ENV vars.
Currently is
bash,git,ripgrep,bitcoind(pinned),electrs(pinned),openssl,pkg-config,libiconv, and latest stable Rust with all goodies.It also handles specific MacOS deps: Apple XCode SDKs (for
bitcoindandelectrsdcrates).Open to suggestions on what to include.
nix develop .#MSRV: same but with Rust MSRV.nix flake check:rustfmt,nixpkgs-fmt(.nixfiles).clippyin all workspace with--all-features --all-targets -- -D warnings.cargo checkin all workspace (latest stable Rust).rustsec/advisory-db..#checks.${system}.{CHECK}nix build -L .: runscargo buildin all workspace with latest stable Rust.nix build -L .#stable: runscargo buildin all workspace with latest stable Rust.nix build -L .#MSRV: runscargo buildin all workspace with MSRV stable Rust.PLACEHOLDER: ...nix build -L .#checks.${system}.{CHECK}: runs a specificCHECK. In my casesystem = aarch64-darwinthen it isnix build .#checks.aarch64-darwin.CHECK.pre-commit-check: checks for typos, conventional commits,nixpkgs-fmt(.nixfiles).clippy: runsclippyin all workspace with--all-features --all-targets -- -D warnings.fmt: runscargo fmtwith--all -- --check --config format_code_in_doc_comments=truein all workspace with latest Rust.audit: checks dependencies for security advisory usingrustsec/advisory-db.latest:cargo buildin whole workspace using latest Rust.latestAll:cargo test --all-featuresin whole workspace using latest Rust.latestNoDefault:cargo test --no-default-featuresin whole workspace using latest Rust.latestNoStdBdk:cargo test -p bdk --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrownusing latest Rust.latestNoStdChain:cargo test -p bdk_chain --no-default-features --features bitcoin/no-std,miniscript/no-std,hashbrownusing latest Rust.latestNoStdEsplora:cargo test -p bdk_esplora --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrownusing latest Rust.MSRV:cargo buildin whole workspace using MSRV Rust.MRSVAll:cargo test --all-featuresin whole workspace using MSRV Rust.MSRVNoDefault:cargo test --no-default-featuresin whole workspace using MSRV Rust.MSRVNoStdBdk:cargo test -p bdk --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrownusing MSRV Rust.MRSVNoStdChain:cargo test -p bdk_chain --no-default-features --features bitcoin/no-std,miniscript/no-std,hashbrownusing MSRV Rust.MSRVNoStdEsplora:cargo test -p bdk_esplora --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrownusing MSRV Rust.Notes to the reviewers
We are adding automatic pre-commit checks with checks for typos, gpg-signed commits, conventional commits,
nixpkgs-fmt(.nixfiles).This is done automatically if the user has Nix and
devshellinstalled.If not, it will be checked on CI, or with a
nix flake check.I fixed a bunch of typos and added the
.typos.tomlto whitelist somethings like hashes, addresses, etc that were being flagged as false positives.I am bumping hashbrown to
0.11.2since it is compatible with MSRV of 1.63I am adding in the building cache/tests a crate name and version.
This does not interact with the name or versioning in any of bdk's crates
Cargo.tomlTo avoid this nasty warning in Nix:
We are using
legacyPackagesinstead ofpackagesin thecibuild calls becauselegacyPackagesallows nested sets, e.g.:It makes a nice grouping of all CI stuff under the same call:
nix build -L .#ci.latest.{CHECK}We are moving from
mozilla/grcovtotaiki-e/cargo-llvm-cov.Why? 3 reasons:
grcovis a big thing, it does coverage for a lot of things C/C++, JS, Java, and Rust.cargo-llvm-covuses Rust's native coverage tools via LLVM.crane(craneLib.cargoLlvmCov) supports nativelycargo-llvm-covwhich will be much easier to make it work and maintainfedimintalso usecargo-llvm-covwithcraneso it makes easier to collaborate in improvements and issues.Potential issues:
We had to remove
Cargo.lockfrom the.gitignore. Nix (crane) needs it for deterministic stuff.From the
craneFAQ:Also Rust changed their
Cargo.lockcommit policy a couple months ago:Mismatch versions between the executables under the
*_EXECenv vars forbitcoind/electrsdcrates and the version the crate thinks to have.Centralizes CI maintainability to people that have Nix experience.
We are removing the auto-download feature of
bitcoindandelectrsdin thebitcoind_rpcandesploracrates. I added an explanation in the repo and crates'README.mds. This also simplifies a little bit the MSRV pinning of deps.Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes: