alpenlabs / strata

Rust implementation of the Strata protocol
https://docs.stratabtc.org
Apache License 2.0
23 stars 1 forks source link

feat(cli): manual signet fee rates, full scan cmd, disable L2 faucet, refresh -> recover, config file + more #382

Closed Zk2u closed 1 month ago

Zk2u commented 1 month ago

Description

Type of Change

Checklist

Related Issues

Closes STR-491 Closes STR-495

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 235 lines in your changes missing coverage. Please review.

Project coverage is 56.86%. Comparing base (31cab87) to head (630a907). Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
bin/strata-cli/src/signet.rs 0.00% 52 Missing :warning:
bin/strata-cli/src/cmd/faucet.rs 0.00% 35 Missing :warning:
bin/strata-cli/src/settings.rs 0.00% 23 Missing :warning:
bin/strata-cli/src/cmd/deposit.rs 0.00% 21 Missing :warning:
bin/strata-cli/src/cmd/recover.rs 0.00% 17 Missing :warning:
bin/strata-cli/src/main.rs 0.00% 17 Missing :warning:
bin/strata-cli/src/cmd/send.rs 0.00% 15 Missing :warning:
bin/strata-cli/src/seed/password.rs 0.00% 13 Missing :warning:
bin/strata-cli/src/cmd/drain.rs 0.00% 11 Missing :warning:
bin/strata-cli/src/cmd/balance.rs 0.00% 8 Missing :warning:
... and 6 more
@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
- Coverage   57.10%   56.86%   -0.25%     
==========================================
  Files         255      257       +2     
  Lines       26978    27083     +105     
==========================================
- Hits        15407    15400       -7     
- Misses      11571    11683     +112     
Files with missing lines Coverage Δ
bin/strata-cli/src/cmd/mod.rs 0.00% <ø> (ø)
bin/strata-cli/src/cmd/reset.rs 0.00% <ø> (ø)
bin/strata-cli/src/constants.rs 100.00% <ø> (ø)
bin/strata-cli/src/net_type.rs 0.00% <ø> (ø)
bin/strata-client/src/extractor.rs 96.29% <ø> (-0.67%) :arrow_down:
bin/strata-cli/src/cmd/receive.rs 0.00% <0.00%> (ø)
bin/strata-cli/src/seed.rs 0.00% <0.00%> (ø)
bin/strata-cli/src/cmd/config.rs 0.00% <0.00%> (ø)
bin/strata-cli/src/cmd/scan.rs 0.00% <0.00%> (ø)
bin/strata-cli/src/cmd/withdraw.rs 0.00% <0.00%> (ø)
... and 11 more

... and 25 files with indirect coverage changes

Zk2u commented 1 month ago

Previous commits also updated the musig2 bridge key as well as the seed size which was not noted in commit details

Zk2u commented 1 month ago

@storopoli pls rereview

storopoli commented 1 month ago

I think this needs a rebase and some lint fixes

john-light commented 1 month ago

after running

cargo install --git https://github.com/alpenlabs/strata strata-cli --locked --force --branch cli-feerates-and-scan

then strata balance signet

I get this error:

strata balance signet
thread 'main' panicked at bin/strata-cli/src/main.rs:26:37:
called `Result::unwrap()` on an `Err` value: missing field `esplora`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

running every other command returns a similar error

Zk2u commented 1 month ago

rebased onto main

delbonis commented 1 month ago

Not sure how this is failing in clippy but nowhere else:

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> bin/strata-cli/src/cmd/faucet.rs:170:21
    |
170 |             let _ = print_explorer_url(&Txid::from_str(&body).expect("valid txid"), &term);
    |                     ^^^^^^^^^^^^^^^^^^---------------------------------------------------- argument #3 of type `&settings::Settings` is missing
    |
note: function defined here
   --> bin/strata-cli/src/signet.rs:44:8
    |
44  | pub fn print_explorer_url(txid: &Txid, term: &Term, settings: &Settings) -> Result<(), io::Error> {
    |        ^^^^^^^^^^^^^^^^^^ -----------  -----------  -------------------
help: provide the argument
    |
170 |             let _ = print_explorer_url(&Txid::from_str(&body).expect("valid txid"), &term, /* &settings::Settings */);
    |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EDIT: Figured it out, it's because we gotta add this to the default-members line in Cargo.toml.

default-members = [
  "bin/bridge-client",
  "bin/datatool",
  "bin/prover-client",
  "bin/strata-reth",
  "bin/strata-client",
]