From e854b90246b61a5ad7e537e818800ea18a2482a3 Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 21 Mar 2022 18:51:16 +0200 Subject: [PATCH 01/19] Initial commit --- .gitignore | 2 ++ LICENSE | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 9 +++++ 3 files changed, 111 insertions(+) create mode 100644 .gitignore create mode 100755 LICENSE create mode 100755 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..96ef6c0b944 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/LICENSE b/LICENSE new file mode 100755 index 00000000000..3f8049c9d9d --- /dev/null +++ b/LICENSE @@ -0,0 +1,100 @@ +Business Source License 1.1 + +License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. +"Business Source License" is a trademark of MariaDB Corporation Ab. + +----------------------------------------------------------------------------- + +Parameters + +Licensor: Fuel Labs + +Licensed Work: fuel-core + The Licensed Work is (c) 2022 Fuel Labs + +Additional Use Grant: Any uses listed and defined at + + +Change Date: The earlier of 2024-01-01 or a date specified at + + +Change License: Apache-2.0 + +----------------------------------------------------------------------------- + +Terms + +The Licensor hereby grants you the right to copy, modify, create derivative +works, redistribute, and make non-production use of the Licensed Work. The +Licensor may make an Additional Use Grant, above, permitting limited +production use. + +Effective on the Change Date, or the fourth anniversary of the first publicly +available distribution of a specific version of the Licensed Work under this +License, whichever comes first, the Licensor hereby grants you rights under +the terms of the Change License, and the rights granted in the paragraph +above terminate. + +If your use of the Licensed Work does not comply with the requirements +currently in effect as described in this License, you must purchase a +commercial license from the Licensor, its affiliated entities, or authorized +resellers, or you must refrain from using the Licensed Work. + +All copies of the original and modified Licensed Work, and derivative works +of the Licensed Work, are subject to this License. This License applies +separately for each version of the Licensed Work and the Change Date may vary +for each version of the Licensed Work released by Licensor. + +You must conspicuously display this License on each original or modified copy +of the Licensed Work. If you receive the Licensed Work in original or +modified form from a third party, the terms and conditions set forth in this +License apply to your use of that work. + +Any use of the Licensed Work in violation of this License will automatically +terminate your rights under this License for the current and all other +versions of the Licensed Work. + +This License does not grant you any right in any trademark or logo of +Licensor or its affiliates (provided that you may use a trademark or logo of +Licensor as expressly required by this License). + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +TITLE. + +MariaDB hereby grants you permission to use this License’s text to license +your works, and to refer to it using the trademark "Business Source License", +as long as you comply with the Covenants of Licensor below. + +----------------------------------------------------------------------------- + +Covenants of Licensor + +In consideration of the right to use this License’s text and the "Business +Source License" name and trademark, Licensor covenants to MariaDB, and to all +other recipients of the licensed work to be provided by Licensor: + +1. To specify as the Change License the GPL Version 2.0 or any later version, + or a license that is compatible with GPL Version 2.0 or a later version, + where "compatible" means that software provided under the Change License can + be included in a program with software provided under GPL Version 2.0 or a + later version. Licensor may specify additional Change Licenses without + limitation. + +2. To either: (a) specify an additional grant of rights to use that does not + impose any additional restriction on the right granted in this License, as + the Additional Use Grant; or (b) insert the text "None". + +3. To specify a Change Date. + +4. Not to modify this License in any other way. + +----------------------------------------------------------------------------- + +Notice + +The Business Source License (this document, or the "License") is not an Open +Source license. However, the Licensed Work will eventually be made available +under an Open Source License, as stated in this License. diff --git a/README.md b/README.md new file mode 100755 index 00000000000..8a6cba064f7 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Fuel Debugger + +[![build](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml/badge.svg)](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml) +[![crates.io](https://img.shields.io/crates/v/fuel-debugger?label=latest)](https://crates.io/crates/fuel-debugger) +[![docs](https://docs.rs/fuel-debugger/badge.svg)](https://docs.rs/fuel-debugger/) +[![discord](https://img.shields.io/badge/chat%20on-discord-orange?&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/xfpK4Pe) + +Debugger attachable to FuelVM. + From 44d3644825929be3cbf60876f836789e5d4e4fbd Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Thu, 24 Mar 2022 16:54:52 +0200 Subject: [PATCH 02/19] Add a CI pipeline (#2) --- .github/workflows/ci.yml | 101 ++++++++++++++++++++++ .github/workflows/nightly-cargo-audit.yml | 14 +++ .github/workflows/scripts/verify_tag.sh | 35 ++++++++ 3 files changed, 150 insertions(+) create mode 100755 .github/workflows/ci.yml create mode 100755 .github/workflows/nightly-cargo-audit.yml create mode 100755 .github/workflows/scripts/verify_tag.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100755 index 00000000000..0dc74c58fdd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,101 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + release: + types: [published] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: -D warnings + REGISTRY: ghcr.io + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + # Build caching action + - uses: Swatinem/rust-cache@v1 + + - name: Install rustfmt + run: rustup component add rustfmt + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all --verbose -- --check + + - name: Check build + uses: actions-rs/cargo@v1 + with: + command: check + args: --verbose --all-targets + + - name: Check Clippy Lints + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --verbose --all-targets + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --all-targets + + - name: Install Cargo.toml linter + uses: baptiste0928/cargo-install@v1 + with: + crate: cargo-toml-lint + version: "0.1" + + - name: Run Cargo.toml linter + run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint + + publish: + # Only do this job if publishing a release + needs: build + if: github.event_name == 'release' && github.event.action == 'published' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Verify tag version + run: | + cargo install toml-cli + ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} Cargo.toml + ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} cli/Cargo.toml + - name: Publish crate + uses: katyo/publish-crates@v1 + with: + publish-delay: 30000 + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + no-verify: false diff --git a/.github/workflows/nightly-cargo-audit.yml b/.github/workflows/nightly-cargo-audit.yml new file mode 100755 index 00000000000..6f5ff26fb42 --- /dev/null +++ b/.github/workflows/nightly-cargo-audit.yml @@ -0,0 +1,14 @@ +name: Nightly Cargo Audit + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + cargo_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scripts/verify_tag.sh b/.github/workflows/scripts/verify_tag.sh new file mode 100755 index 00000000000..e029f651988 --- /dev/null +++ b/.github/workflows/scripts/verify_tag.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +err() { + echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2; +} + +status() { + WIDTH=12 + printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" +} + +REF=$1 +MANIFEST=$2 + +if [ -z "$REF" ]; then + err "Expected ref to be set" + exit 1 +fi + +if [ -z "$MANIFEST" ]; then + err "Expected manifest to be set" + exit 1 +fi + +# strip preceeding 'v' if it exists on tag +REF=${REF/#v} +TOML_VERSION=$(toml get $MANIFEST package.version | tr -d '"') + +if [ "$TOML_VERSION" != "$REF" ]; then + err "Crate version $TOML_VERSION, doesn't match tag version $REF" + exit 1 +else + status "Crate version matches tag $TOML_VERSION" +fi From c6382beafcc5b53471dfcd037462de4d24afcc27 Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 6 Jun 2022 18:37:08 +0200 Subject: [PATCH 03/19] Migrate initial work from fuel-core (#1) Migrate initial work from fuel-core --- .github/workflows/ci.yml | 8 +- .gitignore | 3 + Cargo.toml | 21 ++++ README.md | 5 +- examples/client_usage.rs | 41 +++++++ examples/example_tx.json | 14 +++ src/lib.rs | 5 + src/main.rs | 242 +++++++++++++++++++++++++++++++++++++++ src/names.rs | 16 +++ tests/cli_integration.rs | 53 +++++++++ 10 files changed, 406 insertions(+), 2 deletions(-) create mode 100644 Cargo.toml create mode 100755 examples/client_usage.rs create mode 100755 examples/example_tx.json create mode 100755 src/lib.rs create mode 100644 src/main.rs create mode 100755 src/names.rs create mode 100755 tests/cli_integration.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc74c58fdd..955722313c2 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,12 @@ jobs: command: clippy args: --verbose --all-targets + - name: Install fuel-core for tests + uses: baptiste0928/cargo-install@v1 + with: + crate: fuel-core + version: "0.8" + - name: Run tests uses: actions-rs/cargo@v1 with: @@ -92,7 +98,7 @@ jobs: run: | cargo install toml-cli ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} Cargo.toml - ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} cli/Cargo.toml + ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} client/Cargo.toml - name: Publish crate uses: katyo/publish-crates@v1 with: diff --git a/.gitignore b/.gitignore index 96ef6c0b944..5ef75055707 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /target Cargo.lock + +# Autogenerated files +schema.graphql diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000000..69ef74916d8 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "fuel-debugger" +version = "0.1.0" +edition = "2021" + +[dependencies] +clap = { version = "3.1", features = ["env", "derive"] } +fuel-gql-client = { version = "0.8" } +fuel-types = { version = "0.3", features = ["serde-types"] } +fuel-vm = { version = "0.11", features = ["serde"] } +serde_json = "1.0" +shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] } +surf = "2.0.0" +thiserror = "1.0" +tokio = { version = "1.8", features = ["net", "io-util", "macros", "rt-multi-thread"] } + +[dev-dependencies] +anyhow = "1.0" # Used by the examples only +escargot = "0.5.7" +portpicker = "0.1.1" +rexpect = "0.3" diff --git a/README.md b/README.md index 8a6cba064f7..9ecb78d4aa8 100755 --- a/README.md +++ b/README.md @@ -5,5 +5,8 @@ [![docs](https://docs.rs/fuel-debugger/badge.svg)](https://docs.rs/fuel-debugger/) [![discord](https://img.shields.io/badge/chat%20on-discord-orange?&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/xfpK4Pe) -Debugger attachable to FuelVM. +Debugger attachable to FuelVM over a GraphQL API. +## Testing + +The automated tests assume that `fuel-core` binary is installed. diff --git a/examples/client_usage.rs b/examples/client_usage.rs new file mode 100755 index 00000000000..39ef4fdb6e4 --- /dev/null +++ b/examples/client_usage.rs @@ -0,0 +1,41 @@ +use fuel_debugger::{ContractId, FuelClient, Transaction}; + +#[tokio::main] +async fn main() { + run_example().await.expect("Running example failed"); +} + +async fn run_example() -> Result<(), anyhow::Error> { + let client = FuelClient::new("http://localhost:4000/graphql")?; + + let session_id = client.start_session().await?; + + client + .set_breakpoint(&session_id, ContractId::zeroed(), 0) + .await?; + + let tx: Transaction = + serde_json::from_str(include_str!("example_tx.json")).expect("Invalid transaction JSON"); + let status = client.start_tx(&session_id, &tx).await?; + assert!(status.breakpoint.is_some()); + + let value = client.register(&session_id, 12).await?; + println!("reg[12] = {}", value); + + let mem = client.memory(&session_id, 0x10, 0x20).await?; + println!("mem[0x10..0x30] = {:?}", mem); + + client.set_single_stepping(&session_id, true).await?; + + let status = client.continue_tx(&session_id).await?; + assert!(status.breakpoint.is_some()); + + client.set_single_stepping(&session_id, false).await?; + + let status = client.continue_tx(&session_id).await?; + assert!(status.breakpoint.is_none()); + + client.end_session(&session_id).await?; + + Ok(()) +} diff --git a/examples/example_tx.json b/examples/example_tx.json new file mode 100755 index 00000000000..6ef39a0a8d5 --- /dev/null +++ b/examples/example_tx.json @@ -0,0 +1,14 @@ +{ + "Script": { + "byte_price": 0, + "gas_price": 0, + "gas_limit": 1000000, + "maturity": 0, + "script": [80,64,0,202,80,68,0,186,51,65,16,0,36,4,0,0], + "script_data": [], + "inputs": [], + "outputs": [], + "witnesses": [], + "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" + } +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs new file mode 100755 index 00000000000..e592fb3c154 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,5 @@ +pub mod names; + +// Re-exports +pub use fuel_gql_client::client::FuelClient; +pub use fuel_vm::prelude::{ContractId, Transaction}; diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 00000000000..0246b7a3784 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,242 @@ +use clap::Parser; +use fuel_debugger::names::register_name; +use shellfish::async_fn; +use shellfish::{Command as ShCommand, Shell}; +use std::error::Error; + +use fuel_debugger::{names, ContractId, FuelClient, Transaction}; +use fuel_vm::consts::{VM_MAX_RAM, VM_REGISTER_COUNT, WORD_SIZE}; + +#[derive(Parser, Debug)] +pub struct Opt { + #[clap(default_value = "http://127.0.0.1:4000/graphql")] + pub api_url: String, +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + let config = Opt::parse(); + + let mut shell = Shell::new_async( + State { + client: FuelClient::new(&config.api_url)?, + session_id: String::new(), // Placeholder + }, + ">> ", + ); + + macro_rules! command { + ($f:ident, $help:literal, $names:expr) => { + for c in $names { + shell.commands.insert( + c, + ShCommand::new_async($help.to_string(), async_fn!(State, $f)), + ); + } + }; + } + + command!( + cmd_start_tx, + "path/to/tx.json -- start a new transaction", + ["n", "tx", "new_tx", "start_tx"] + ); + command!( + cmd_continue, + "-- run until next breakpoint or termination", + ["c", "continue"] + ); + command!( + cmd_step, + "[on|off] -- turn single-stepping on or off", + ["s", "step"] + ); + command!( + cmd_breakpoint, + "[contract_id] offset -- set a breakpoint", + ["b", "breakpoint"] + ); + command!( + cmd_registers, + "[regname ...] -- dump registers", + ["r", "reg", "register", "registers"] + ); + command!(cmd_memory, "[offset] limit -- dump memory", ["m", "memory"]); + + let session_id = shell.state.client.start_session().await?; + shell.state.session_id = session_id.clone(); + shell.run_async().await?; + shell.state.client.end_session(&session_id).await?; + Ok(()) +} + +struct State { + client: FuelClient, + session_id: String, +} + +#[derive(Debug, thiserror::Error)] +enum ArgError { + #[error("Invalid argument")] + Invalid, + #[error("Not enough arguments")] + NotEnough, + #[error("Too many arguments")] + TooMany, +} + +async fn cmd_start_tx(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + let path_to_tx_json = args.pop().ok_or_else(|| Box::new(ArgError::NotEnough))?; + if !args.is_empty() { + return Err(Box::new(ArgError::TooMany)); + } + + let tx_json = std::fs::read(path_to_tx_json)?; + let tx: Transaction = serde_json::from_slice(&tx_json).unwrap(); + let status = state.client.start_tx(&state.session_id, &tx).await?; + println!("{:?}", status); // TODO: pretty-print + + Ok(()) +} + +async fn cmd_continue(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + if !args.is_empty() { + return Err(Box::new(ArgError::TooMany)); + } + + let status = state.client.continue_tx(&state.session_id).await?; + println!("{:?}", status); // TODO: pretty-print + + Ok(()) +} + +async fn cmd_step(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + if args.len() > 1 { + return Err(Box::new(ArgError::TooMany)); + } + + state + .client + .set_single_stepping( + &state.session_id, + args.get(0) + .map(|v| !["off", "no", "disable"].contains(&v.as_str())) + .unwrap_or(true), + ) + .await?; + Ok(()) +} + +async fn cmd_breakpoint(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + let offset = args.pop().ok_or_else(|| Box::new(ArgError::NotEnough))?; + let contract_id = args.pop(); + + if !args.is_empty() { + return Err(Box::new(ArgError::TooMany)); + } + + let offset = if let Some(offset) = parse_int(&offset) { + offset as u64 + } else { + return Err(Box::new(ArgError::Invalid)); + }; + + let contract = if let Some(contract_id) = contract_id { + if let Ok(contract_id) = contract_id.parse::() { + contract_id + } else { + return Err(Box::new(ArgError::Invalid)); + } + } else { + ContractId::zeroed() // Current script + }; + + state + .client + .set_breakpoint(&state.session_id, contract, offset) + .await?; + + Ok(()) +} + +async fn cmd_registers(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + + if args.is_empty() { + for r in 0..VM_REGISTER_COUNT { + let value = state.client.register(&state.session_id, r).await?; + println!("reg[{:#x}] = {:<8} # {}", r, value, register_name(r)); + } + } else { + for arg in &args { + if let Some(v) = parse_int(arg) { + if v < VM_REGISTER_COUNT { + let value = state.client.register(&state.session_id, v).await?; + println!("reg[{:#02x}] = {:<8} # {}", v, value, register_name(v)); + } else { + println!("Register index too large {}", v); + return Ok(()); + } + } else if let Some(index) = names::register_index(arg) { + let value = state.client.register(&state.session_id, index).await?; + println!("reg[{:#02x}] = {:<8} # {}", index, value, arg); + } else { + println!("Unknown register name {}", arg); + return Ok(()); + } + } + } + + Ok(()) +} + +async fn cmd_memory(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + + let limit = args + .pop() + .map(|a| parse_int(&a).ok_or(ArgError::Invalid)) + .transpose()? + .unwrap_or(WORD_SIZE * (VM_MAX_RAM as usize)); + + let offset = args + .pop() + .map(|a| parse_int(&a).ok_or(ArgError::Invalid)) + .transpose()? + .unwrap_or(0); + + if !args.is_empty() { + return Err(Box::new(ArgError::TooMany)); + } + + let mem = state + .client + .memory(&state.session_id, offset, limit) + .await?; + + for (i, chunk) in mem.chunks(WORD_SIZE).enumerate() { + print!(" {:06x}:", offset + i * WORD_SIZE); + for byte in chunk { + print!(" {:02x}", byte); + } + println!(); + } + + Ok(()) +} + +fn parse_int(s: &str) -> Option { + let (s, radix) = if let Some(stripped) = s.strip_prefix("0x") { + (stripped, 16) + } else { + (s, 10) + }; + + let s = s.replace('_', ""); + + usize::from_str_radix(&s, radix).ok() +} diff --git a/src/names.rs b/src/names.rs new file mode 100755 index 00000000000..91e8833cbf4 --- /dev/null +++ b/src/names.rs @@ -0,0 +1,16 @@ +pub const REGISTERS: [&str; 16] = [ + "zero", "one", "of", "pc", "ssp", "sp", "fp", "hp", "err", "ggas", "cgas", "bal", "is", "ret", + "retl", "flag", +]; + +pub fn register_name(index: usize) -> String { + if index < REGISTERS.len() { + REGISTERS[index].to_owned() + } else { + format!("reg{index}") + } +} + +pub fn register_index(name: &str) -> Option { + REGISTERS.iter().position(|&n| n == name) +} diff --git a/tests/cli_integration.rs b/tests/cli_integration.rs new file mode 100755 index 00000000000..388472c0b48 --- /dev/null +++ b/tests/cli_integration.rs @@ -0,0 +1,53 @@ +#![deny(unused_must_use)] + +use escargot::CargoBuild; +use rexpect::session::spawn_command; +use std::process::Command; + +#[test] +fn test_cli() { + let port = portpicker::pick_unused_port().expect("No ports free"); + + let mut fuel_core = Command::new("fuel-core") + .arg("--db-type") + .arg("in-memory") + .arg("--port") + .arg(port.to_string()) + .spawn() + .expect("Failed to start fuel-core"); + + let mut run_cmd = CargoBuild::new() + .bin("fuel-debugger") + .current_release() + .current_target() + .run() + .unwrap() + .command(); + + dbg!(&run_cmd); + + run_cmd.arg(format!("http://127.0.0.1:{}/graphql", port)); + + let mut cmd = spawn_command(run_cmd, Some(2000)).unwrap(); + + cmd.exp_regex(r"^>> ").unwrap(); + cmd.send_line("reg 0").unwrap(); + cmd.exp_regex(r"reg\[0x0\] = 0\s+# zero").unwrap(); + cmd.send_line("reg 1").unwrap(); + cmd.exp_regex(r"reg\[0x1\] = 1\s+# one").unwrap(); + cmd.send_line("breakpoint 0").unwrap(); + cmd.exp_regex(r">> ").unwrap(); + cmd.send_line("start_tx examples/example_tx.json").unwrap(); + cmd.exp_regex(r"breakpoint.+0{64}.+pc: U64\(0\)").unwrap(); + cmd.send_line("step on").unwrap(); + cmd.exp_regex(r">> ").unwrap(); + cmd.send_line("continue").unwrap(); + cmd.exp_regex(r"breakpoint.+0{64}.+pc: U64\(4\)").unwrap(); + cmd.send_line("step off").unwrap(); + cmd.exp_regex(r">> ").unwrap(); + cmd.send_line("continue").unwrap(); + cmd.exp_regex(r"breakpoint: None").unwrap(); + cmd.send_line(r"exit").unwrap(); + + fuel_core.kill().expect("Couldn't kill fuel-core"); +} From 618b0c2c4b972338c789f8a64dcfe7c90a466bab Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 13 Jun 2022 13:49:35 +0200 Subject: [PATCH 04/19] Reset command (#12) --- src/main.rs | 16 ++++++++++++++++ tests/cli_integration.rs | 3 +++ 2 files changed, 19 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0246b7a3784..c1632baf16a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,11 @@ async fn main() -> Result<(), Box> { "path/to/tx.json -- start a new transaction", ["n", "tx", "new_tx", "start_tx"] ); + command!( + cmd_reset, + "-- reset, removing breakpoints and other state", + ["reset"] + ); command!( cmd_continue, "-- run until next breakpoint or termination", @@ -100,6 +105,17 @@ async fn cmd_start_tx(state: &mut State, mut args: Vec) -> Result<(), Bo Ok(()) } +async fn cmd_reset(state: &mut State, mut args: Vec) -> Result<(), Box> { + args.remove(0); + if !args.is_empty() { + return Err(Box::new(ArgError::TooMany)); + } + + let _ = state.client.reset(&state.session_id).await?; + + Ok(()) +} + async fn cmd_continue(state: &mut State, mut args: Vec) -> Result<(), Box> { args.remove(0); if !args.is_empty() { diff --git a/tests/cli_integration.rs b/tests/cli_integration.rs index 388472c0b48..3500f49cff7 100755 --- a/tests/cli_integration.rs +++ b/tests/cli_integration.rs @@ -47,6 +47,9 @@ fn test_cli() { cmd.exp_regex(r">> ").unwrap(); cmd.send_line("continue").unwrap(); cmd.exp_regex(r"breakpoint: None").unwrap(); + cmd.send_line("reset").unwrap(); + cmd.send_line("start_tx examples/example_tx.json").unwrap(); + cmd.exp_regex(r"breakpoint: None").unwrap(); cmd.send_line(r"exit").unwrap(); fuel_core.kill().expect("Couldn't kill fuel-core"); From 55cce5944814474b08fe2bb07fb3c004fef065f7 Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 13 Jun 2022 19:24:13 +0200 Subject: [PATCH 05/19] Bump dependency versions (for RUSTSEC-2022-0013) (#13) --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 69ef74916d8..304f9137bce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,12 +10,12 @@ fuel-types = { version = "0.3", features = ["serde-types"] } fuel-vm = { version = "0.11", features = ["serde"] } serde_json = "1.0" shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] } -surf = "2.0.0" +surf = "2.3" thiserror = "1.0" -tokio = { version = "1.8", features = ["net", "io-util", "macros", "rt-multi-thread"] } +tokio = { version = "1.19", features = ["net", "io-util", "macros", "rt-multi-thread"] } [dev-dependencies] anyhow = "1.0" # Used by the examples only escargot = "0.5.7" portpicker = "0.1.1" -rexpect = "0.3" +rexpect = "0.4" From bd4b31658dc72c4d1bc59fc0dcd7ca61a5b823d5 Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Thu, 23 Jun 2022 02:14:51 +0200 Subject: [PATCH 06/19] Display receipts when stopped (#11) --- Cargo.toml | 4 ++-- src/lib.rs | 2 +- src/main.rs | 20 +++++++++++++++++--- tests/cli_integration.rs | 10 ++++++---- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 304f9137bce..3636500e814 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" [dependencies] clap = { version = "3.1", features = ["env", "derive"] } -fuel-gql-client = { version = "0.8" } +fuel-gql-client = { version = "0.9" } fuel-types = { version = "0.3", features = ["serde-types"] } -fuel-vm = { version = "0.11", features = ["serde"] } +fuel-vm = { version = "0.12", features = ["serde"] } serde_json = "1.0" shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] } surf = "2.3" diff --git a/src/lib.rs b/src/lib.rs index e592fb3c154..dd944d740c7 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ pub mod names; // Re-exports -pub use fuel_gql_client::client::FuelClient; +pub use fuel_gql_client::client::{schema::RunResult, FuelClient}; pub use fuel_vm::prelude::{ContractId, Transaction}; diff --git a/src/main.rs b/src/main.rs index c1632baf16a..799b1b7762d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use shellfish::async_fn; use shellfish::{Command as ShCommand, Shell}; use std::error::Error; -use fuel_debugger::{names, ContractId, FuelClient, Transaction}; +use fuel_debugger::{names, ContractId, FuelClient, RunResult, Transaction}; use fuel_vm::consts::{VM_MAX_RAM, VM_REGISTER_COUNT, WORD_SIZE}; #[derive(Parser, Debug)] @@ -90,6 +90,20 @@ enum ArgError { TooMany, } +fn pretty_print_run_result(rr: &RunResult) { + for receipt in rr.receipts() { + println!("Receipt: {:?}", receipt); + } + if let Some(bp) = &rr.breakpoint { + println!( + "Stopped on breakpoint at address {} of contract {}", + bp.pc.0, bp.contract + ); + } else { + println!("Terminated"); + } +} + async fn cmd_start_tx(state: &mut State, mut args: Vec) -> Result<(), Box> { args.remove(0); let path_to_tx_json = args.pop().ok_or_else(|| Box::new(ArgError::NotEnough))?; @@ -100,7 +114,7 @@ async fn cmd_start_tx(state: &mut State, mut args: Vec) -> Result<(), Bo let tx_json = std::fs::read(path_to_tx_json)?; let tx: Transaction = serde_json::from_slice(&tx_json).unwrap(); let status = state.client.start_tx(&state.session_id, &tx).await?; - println!("{:?}", status); // TODO: pretty-print + pretty_print_run_result(&status); Ok(()) } @@ -123,7 +137,7 @@ async fn cmd_continue(state: &mut State, mut args: Vec) -> Result<(), Bo } let status = state.client.continue_tx(&state.session_id).await?; - println!("{:?}", status); // TODO: pretty-print + pretty_print_run_result(&status); Ok(()) } diff --git a/tests/cli_integration.rs b/tests/cli_integration.rs index 3500f49cff7..62ed740ce40 100755 --- a/tests/cli_integration.rs +++ b/tests/cli_integration.rs @@ -38,18 +38,20 @@ fn test_cli() { cmd.send_line("breakpoint 0").unwrap(); cmd.exp_regex(r">> ").unwrap(); cmd.send_line("start_tx examples/example_tx.json").unwrap(); - cmd.exp_regex(r"breakpoint.+0{64}.+pc: U64\(0\)").unwrap(); + cmd.exp_regex(r"Stopped on breakpoint at address 0 of contract 0x0{64}") + .unwrap(); cmd.send_line("step on").unwrap(); cmd.exp_regex(r">> ").unwrap(); cmd.send_line("continue").unwrap(); - cmd.exp_regex(r"breakpoint.+0{64}.+pc: U64\(4\)").unwrap(); + cmd.exp_regex(r"Stopped on breakpoint at address 4 of contract 0x0{64}") + .unwrap(); cmd.send_line("step off").unwrap(); cmd.exp_regex(r">> ").unwrap(); cmd.send_line("continue").unwrap(); - cmd.exp_regex(r"breakpoint: None").unwrap(); + cmd.exp_regex(r"Receipt: Return").unwrap(); cmd.send_line("reset").unwrap(); cmd.send_line("start_tx examples/example_tx.json").unwrap(); - cmd.exp_regex(r"breakpoint: None").unwrap(); + cmd.exp_regex(r"Receipt: Return").unwrap(); cmd.send_line(r"exit").unwrap(); fuel_core.kill().expect("Couldn't kill fuel-core"); From fc07a649721cdca56e1a111c2043275ba2a2cf5d Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 18 Jul 2022 03:02:42 +0300 Subject: [PATCH 07/19] Walkthrough tutorial (#14) --- docs/walkthrough.md | 316 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100755 docs/walkthrough.md diff --git a/docs/walkthrough.md b/docs/walkthrough.md new file mode 100755 index 00000000000..d14a855810b --- /dev/null +++ b/docs/walkthrough.md @@ -0,0 +1,316 @@ +## An example project + +First, we need a project to debug, so create a new project using + +```bash +forc new --script dbg_example && cd dbg_example +``` + +And then add some content to `src/main.sw`, for example: + +```sway +script; + +use std::logging::log; + +fn factorial(n: u64) -> u64 { + let mut result = 1; + let mut counter = 0; + while counter < n { + counter = counter + 1; + result = result * counter; + } + return result; +} + +fn main() { + log::(factorial(5)); // 120 +} +``` + + +## Building and bytecode output + +Now we are ready to build the thing. + +```bash +forc build +``` + +After this the resulting binary should be located at `out/debug/dbg_example.bin`. Because we are interested in the resulting bytecode, we can read that with: + +```bash +forc parse-bytecode out/debug/dbg_example.bin +``` + +Which should give us something like + +```text + half-word byte op raw notes + 0 0 JI(4) 90 00 00 04 jump to byte 16 + 1 4 NOOP 47 00 00 00 + 2 8 Undefined 00 00 00 00 data section offset lo (0) + 3 12 Undefined 00 00 00 cc data section offset hi (204) + 4 16 LW(63, 12, 1) 5d fc c0 01 + 5 20 ADD(63, 63, 12) 10 ff f3 00 + 6 24 MOVE(20, 5) 1a 50 50 00 + 7 28 CFEI(24) 91 00 00 18 + 8 32 ADDI(16, 20, 8) 50 41 40 08 + 9 36 LW(16, 63, 0) 5d 43 f0 00 + 10 40 SW(20, 16, 1) 5f 51 00 01 + 11 44 ADDI(16, 20, 0) 50 41 40 00 + 12 48 LW(16, 63, 1) 5d 43 f0 01 + 13 52 SW(20, 16, 0) 5f 51 00 00 + 14 56 ADDI(16, 20, 0) 50 41 40 00 + 15 60 LW(17, 20, 0) 5d 45 40 00 + 16 64 LW(16, 63, 2) 5d 43 f0 02 + 17 68 LT(16, 17, 16) 16 41 14 00 + 18 72 JNZI(16, 20) 73 40 00 14 conditionally jump to byte 80 + 19 76 JI(34) 90 00 00 22 jump to byte 136 + 20 80 ADDI(16, 20, 0) 50 41 40 00 + 21 84 ADDI(16, 20, 0) 50 41 40 00 + 22 88 LW(17, 20, 0) 5d 45 40 00 + 23 92 LW(16, 63, 0) 5d 43 f0 00 + 24 96 ADD(16, 16, 17) 10 41 04 40 + 25 100 SW(20, 16, 0) 5f 51 00 00 + 26 104 ADDI(16, 20, 8) 50 41 40 08 + 27 108 ADDI(16, 20, 8) 50 41 40 08 + 28 112 LW(17, 20, 1) 5d 45 40 01 + 29 116 ADDI(16, 20, 0) 50 41 40 00 + 30 120 LW(16, 20, 0) 5d 41 40 00 + 31 124 MUL(16, 17, 16) 1b 41 14 00 + 32 128 SW(20, 16, 1) 5f 51 00 01 + 33 132 JI(14) 90 00 00 0e jump to byte 56 + 34 136 ADDI(16, 20, 8) 50 41 40 08 + 35 140 LW(16, 20, 1) 5d 41 40 01 + 36 144 JI(37) 90 00 00 25 jump to byte 148 + 37 148 LW(17, 63, 3) 5d 47 f0 03 + 38 152 EQ(17, 17, 0) 13 45 10 00 + 39 156 JNZI(17, 41) 73 44 00 29 conditionally jump to byte 164 + 40 160 JI(43) 90 00 00 2b jump to byte 172 + 41 164 LOG(16, 0, 0, 0) 33 40 00 00 + 42 168 JI(49) 90 00 00 31 jump to byte 196 + 43 172 LW(19, 63, 4) 5d 4f f0 04 + 44 176 ADDI(17, 20, 16) 50 45 40 10 + 45 180 SW(20, 19, 2) 5f 51 30 02 + 46 184 ADDI(17, 20, 16) 50 45 40 10 + 47 188 LW(17, 20, 2) 5d 45 40 02 + 48 192 LOGD(0, 0, 16, 17) 34 00 04 11 + 49 196 LW(16, 63, 1) 5d 43 f0 01 + 50 200 RET(0) 24 00 00 00 + 51 204 Undefined 00 00 00 00 + 52 208 Undefined 00 00 00 01 + 53 212 Undefined 00 00 00 00 + 54 216 Undefined 00 00 00 00 + 55 220 Undefined 00 00 00 00 + 56 224 Undefined 00 00 00 05 + 57 228 Undefined 00 00 00 00 + 58 232 Undefined 00 00 00 00 + 59 236 Undefined 00 00 00 00 + 60 240 Undefined 00 00 00 08 +``` + +We can recognize the `while` loop by the conditional jumps `JNZI(..)`. The condition just before the first jump can be identified by `LT(..)` instruction (for `<`). Some notable instructions that are generated only once in our code include `MUL(..)` for multiplication and `LOG(.., 0, 0, 0)` from the `log` function. + +## Setting up the debugging + +We can start up the debug infrastructure. On a new terminal session run `fuel-core --db-type in-memory`; we need to have that running because it actually executes the program. Now we can fire up the debugger itself: `fuel-debugger`. Now +if everything is set up correctly, you shoould see the debugger prompt (`>> `). You can use `help` command to list available commands. + +Now we would like to inspect the program while it's running. To do this, we first need to send the script to the executor, i.e. `fuel-core`. To do so, we need a *transaction specification*, `tx.json`. It looks something like this: + +```json +{ + "Script": { + "byte_price": 0, + "gas_price": 0, + "gas_limit": 1000000, + "maturity": 0, + "script": [], + "script_data": [], + "inputs": [], + "outputs": [], + "witnesses": [], + "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" + } +} +``` + +However, the key `script` in should contain the actual bytecode to execute, i.e. the contents of `out/debug/dbg_example.bin` as a JSON array. The following command can be used to generate it: + +```bash +python3 -c 'print(list(open("out/debug/dbg_example.bin", "rb").read()))' +``` + +So now we replace the script array with the result, and save it as `tx.json`. It looks something like this: + +```json +{ + "Script": { + "byte_price": 0, + "gas_price": 0, + "gas_limit": 1000000, + "maturity": 0, + "script": [144, 0, 0, 4, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 93, 252, 192, 1, 16, 255, 243, 0, 26, 80, 80, 0, 145, 0, 0, 24, 80, 65, 64, 8, 93, 67, 240, 0, 95, 81, 0, 1, 80, 65, 64, 0, 93, 67, 240, 1, 95, 81, 0, 0, 80, 65, 64, 0, 93, 69, 64, 0, 93, 67, 240, 2, 22, 65, 20, 0, 115, 64, 0, 20, 144, 0, 0, 34, 80, 65, 64, 0, 80, 65, 64, 0, 93, 69, 64, 0, 93, 67, 240, 0, 16, 65, 4, 64, 95, 81, 0, 0, 80, 65, 64, 8, 80, 65, 64, 8, 93, 69, 64, 1, 80, 65, 64, 0, 93, 65, 64, 0, 27, 65, 20, 0, 95, 81, 0, 1, 144, 0, 0, 14, 80, 65, 64, 8, 93, 65, 64, 1, 144, 0, 0, 37, 93, 71, 240, 3, 19, 69, 16, 0, 115, 68, 0, 41, 144, 0, 0, 43, 51, 64, 0, 0, 144, 0, 0, 49, 93, 79, 240, 4, 80, 69, 64, 16, 95, 81, 48, 2, 80, 69, 64, 16, 93, 69, 64, 2, 52, 0, 4, 17, 93, 67, 240, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8], + "script_data": [], + "inputs": [], + "outputs": [], + "witnesses": [], + "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" + } +} +``` + +## Using the debugger + +Now we can actually execute the script: + +```text +>> start_tx tx.json + +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } +Receipt: ScriptResult { result: Success, gas_used: 1302 } +Terminated +``` + +Looking at the first output line, we can see that it logged `ra: 120` which is the correct return value for `factorial(5)`. It also tells us that the exection terminated without hitting any breakpoints. That's unsurprising, because we haven't set up any. We can do so with `breakpoint` command: + +```text +>> breakpoint 0 + +>> start_tx tx.json + +Receipt: ScriptResult { result: Success, gas_used: 0 } +Stopped on breakpoint at address 0 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +``` + +Now we have stopped execution at the breakpoint on entry (address `0`). We can now inspect the initial state of the VM. + +``` +>> register ggas + +reg[0x9] = 1000000 # ggas + +>> memory 0x10 0x8 + + 000010: dc dd a0 56 c2 20 1c 6b +``` + +However, that's not too interesting either, so let's just execute until the end, and then reset the vm to remove the breakpoints. + +``` +>> continue + +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } +Terminated + +>> reset + +``` + +Next, we will setup a breakpoint to check the state on each iteration of the `while` loop. For instance, if we'd like to see what numbers get multiplied together, we could set up a breakpoint before the operation. The bytecode has only a single `MUL` instruction: + +``` + half-word byte op raw notes + 31 124 MUL(16, 17, 16) 1b 41 14 00 +``` + +We can set a breakpoint on its address, at halfword-offset `31`. + +``` +>>> breakpoint 31 + +>> start_tx tx.json + +Receipt: ScriptResult { result: Success, gas_used: 287 } +Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +``` + +Now we can inspect the inputs tu multiply. Looking at [the specification](https://github.com/FuelLabs/fuel-specs/blob/master/specs/vm/instruction_set.md#mul-multiply) tells us that the instruction `MUL(16, 17, 16)` means `reg[16] = reg[17] * reg[16]`. So inpecting the inputs tells us that + +``` +>> r 16 17 + +reg[0x10] = 1 # reg16 +reg[0x11] = 1 # reg17 +``` + +So on the first round the numbers are `1` and `1`, so we can continue to the next iteration: + +``` +>> c + +Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +>> r 16 17 + +reg[0x10] = 2 # reg16 +reg[0x11] = 1 # reg17 + +``` + +And the next one: + +``` +>> c + +Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +>> r 16 17 + +reg[0x10] = 3 # reg16 +reg[0x11] = 2 # reg17 + +``` + +And fourth one: + +``` +>> c + +Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +>> r 16 17 + +reg[0x10] = 4 # reg16 +reg[0x11] = 6 # reg17 + +``` + +And round 5: + +``` +>> c + +Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 + +>> r 16 17 + +reg[0x10] = 5 # reg16 +reg[0x11] = 24 # reg17 + +``` + +At this point we can look at the values + +16 | 17 +---|---- +1 | 1 +2 | 1 +3 | 2 +4 | 6 +5 | 24 + +From this we can clearly see that the left side, register `16` is the `counter` variable, and register `17` is `result`. Now the counter equals the given factorial function argument `5`, and the loop terminates. So when we continue, the program finishes without encountering any more breakpoints: + +``` +>> c + +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } +Terminated +``` From 68b3a3c3a06b1ccdba6b92a1127930b61da2c8b3 Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Mon, 27 Nov 2023 21:36:24 +0200 Subject: [PATCH 08/19] Update to latest Fuel versions (#16) * Update to latest Fuel versions * Update tests * fmt * Use latest fuel-core in ci * Newer rust install * Clippy * Install fuel-core binary correctly * Fix some minor errors --- .github/workflows/ci.yml | 6 +- Cargo.toml | 6 +- docs/walkthrough.md | 219 +++++++++++++++++---------------------- examples/example_tx.json | 187 +++++++++++++++++++++++++++++++-- src/lib.rs | 2 +- src/main.rs | 13 ++- tests/cli_integration.rs | 4 +- 7 files changed, 292 insertions(+), 145 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 955722313c2..24d1f7c8b7e 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,10 +58,10 @@ jobs: args: --verbose --all-targets - name: Install fuel-core for tests - uses: baptiste0928/cargo-install@v1 + uses: baptiste0928/cargo-install@v2 with: - crate: fuel-core - version: "0.8" + crate: fuel-core-bin + version: "0.21" - name: Run tests uses: actions-rs/cargo@v1 diff --git a/Cargo.toml b/Cargo.toml index 3636500e814..45e6f9ad722 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" [dependencies] clap = { version = "3.1", features = ["env", "derive"] } -fuel-gql-client = { version = "0.9" } -fuel-types = { version = "0.3", features = ["serde-types"] } -fuel-vm = { version = "0.12", features = ["serde"] } +fuel-core-client = { version = "0.21" } +fuel-types = { version = "0.43", features = ["serde"] } +fuel-vm = { version = "0.43", features = ["serde"] } serde_json = "1.0" shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] } surf = "2.3" diff --git a/docs/walkthrough.md b/docs/walkthrough.md index d14a855810b..88a0b1609c3 100755 --- a/docs/walkthrough.md +++ b/docs/walkthrough.md @@ -46,75 +46,34 @@ forc parse-bytecode out/debug/dbg_example.bin Which should give us something like ```text - half-word byte op raw notes - 0 0 JI(4) 90 00 00 04 jump to byte 16 - 1 4 NOOP 47 00 00 00 - 2 8 Undefined 00 00 00 00 data section offset lo (0) - 3 12 Undefined 00 00 00 cc data section offset hi (204) - 4 16 LW(63, 12, 1) 5d fc c0 01 - 5 20 ADD(63, 63, 12) 10 ff f3 00 - 6 24 MOVE(20, 5) 1a 50 50 00 - 7 28 CFEI(24) 91 00 00 18 - 8 32 ADDI(16, 20, 8) 50 41 40 08 - 9 36 LW(16, 63, 0) 5d 43 f0 00 - 10 40 SW(20, 16, 1) 5f 51 00 01 - 11 44 ADDI(16, 20, 0) 50 41 40 00 - 12 48 LW(16, 63, 1) 5d 43 f0 01 - 13 52 SW(20, 16, 0) 5f 51 00 00 - 14 56 ADDI(16, 20, 0) 50 41 40 00 - 15 60 LW(17, 20, 0) 5d 45 40 00 - 16 64 LW(16, 63, 2) 5d 43 f0 02 - 17 68 LT(16, 17, 16) 16 41 14 00 - 18 72 JNZI(16, 20) 73 40 00 14 conditionally jump to byte 80 - 19 76 JI(34) 90 00 00 22 jump to byte 136 - 20 80 ADDI(16, 20, 0) 50 41 40 00 - 21 84 ADDI(16, 20, 0) 50 41 40 00 - 22 88 LW(17, 20, 0) 5d 45 40 00 - 23 92 LW(16, 63, 0) 5d 43 f0 00 - 24 96 ADD(16, 16, 17) 10 41 04 40 - 25 100 SW(20, 16, 0) 5f 51 00 00 - 26 104 ADDI(16, 20, 8) 50 41 40 08 - 27 108 ADDI(16, 20, 8) 50 41 40 08 - 28 112 LW(17, 20, 1) 5d 45 40 01 - 29 116 ADDI(16, 20, 0) 50 41 40 00 - 30 120 LW(16, 20, 0) 5d 41 40 00 - 31 124 MUL(16, 17, 16) 1b 41 14 00 - 32 128 SW(20, 16, 1) 5f 51 00 01 - 33 132 JI(14) 90 00 00 0e jump to byte 56 - 34 136 ADDI(16, 20, 8) 50 41 40 08 - 35 140 LW(16, 20, 1) 5d 41 40 01 - 36 144 JI(37) 90 00 00 25 jump to byte 148 - 37 148 LW(17, 63, 3) 5d 47 f0 03 - 38 152 EQ(17, 17, 0) 13 45 10 00 - 39 156 JNZI(17, 41) 73 44 00 29 conditionally jump to byte 164 - 40 160 JI(43) 90 00 00 2b jump to byte 172 - 41 164 LOG(16, 0, 0, 0) 33 40 00 00 - 42 168 JI(49) 90 00 00 31 jump to byte 196 - 43 172 LW(19, 63, 4) 5d 4f f0 04 - 44 176 ADDI(17, 20, 16) 50 45 40 10 - 45 180 SW(20, 19, 2) 5f 51 30 02 - 46 184 ADDI(17, 20, 16) 50 45 40 10 - 47 188 LW(17, 20, 2) 5d 45 40 02 - 48 192 LOGD(0, 0, 16, 17) 34 00 04 11 - 49 196 LW(16, 63, 1) 5d 43 f0 01 - 50 200 RET(0) 24 00 00 00 - 51 204 Undefined 00 00 00 00 - 52 208 Undefined 00 00 00 01 - 53 212 Undefined 00 00 00 00 - 54 216 Undefined 00 00 00 00 - 55 220 Undefined 00 00 00 00 - 56 224 Undefined 00 00 00 05 - 57 228 Undefined 00 00 00 00 - 58 232 Undefined 00 00 00 00 - 59 236 Undefined 00 00 00 00 - 60 240 Undefined 00 00 00 08 + + half-word byte op raw notes + 0 0 JI { imm: 4 } 90 00 00 04 jump to byte 16 + 1 4 NOOP 47 00 00 00 + 2 8 InvalidOpcode 00 00 00 00 data section offset lo (0) + 3 12 InvalidOpcode 00 00 00 44 data section offset hi (68) + 4 16 LW { ra: 63, rb: 12, imm: 1 } 5d fc c0 01 + 5 20 ADD { ra: 63, rb: 63, rc: 12 } 10 ff f3 00 + 6 24 MOVE { ra: 18, rb: 1 } 1a 48 10 00 + 7 28 MOVE { ra: 17, rb: 0 } 1a 44 00 00 + 8 32 LW { ra: 16, rb: 63, imm: 0 } 5d 43 f0 00 + 9 36 LT { ra: 16, rb: 17, rc: 16 } 16 41 14 00 + 10 40 JNZI { ra: 16, imm: 13 } 73 40 00 0d conditionally jump to byte 52 + 11 44 LOG { ra: 18, rb: 0, rc: 0, rd: 0 } 33 48 00 00 + 12 48 RET { ra: 0 } 24 00 00 00 + 13 52 ADD { ra: 17, rb: 17, rc: 1 } 10 45 10 40 + 14 56 MUL { ra: 18, rb: 18, rc: 17 } 1b 49 24 40 + 15 60 JI { imm: 8 } 90 00 00 08 jump to byte 32 + 16 64 NOOP 47 00 00 00 + 17 68 InvalidOpcode 00 00 00 00 + 18 72 InvalidOpcode 00 00 00 05 ``` -We can recognize the `while` loop by the conditional jumps `JNZI(..)`. The condition just before the first jump can be identified by `LT(..)` instruction (for `<`). Some notable instructions that are generated only once in our code include `MUL(..)` for multiplication and `LOG(.., 0, 0, 0)` from the `log` function. +We can recognize the `while` loop by the conditional jumps `JNZI`. The condition just before the first jump can be identified by `LT` instruction (for `<`). Some notable instructions that are generated only once in our code include `MUL` for multiplication and `LOG {.., 0, 0, 0}` from the `log` function. ## Setting up the debugging -We can start up the debug infrastructure. On a new terminal session run `fuel-core --db-type in-memory`; we need to have that running because it actually executes the program. Now we can fire up the debugger itself: `fuel-debugger`. Now +We can start up the debug infrastructure. On a new terminal session run `fuel-core run --db-type in-memory --debug`; we need to have that running because it actually executes the program. Now we can fire up the debugger itself: `fuel-debugger`. Now if everything is set up correctly, you shoould see the debugger prompt (`>> `). You can use `help` command to list available commands. Now we would like to inspect the program while it's running. To do this, we first need to send the script to the executor, i.e. `fuel-core`. To do so, we need a *transaction specification*, `tx.json`. It looks something like this: @@ -122,44 +81,55 @@ Now we would like to inspect the program while it's running. To do this, we firs ```json { "Script": { - "byte_price": 0, - "gas_price": 0, - "gas_limit": 1000000, - "maturity": 0, + "script_gas_limit": 1000000, "script": [], "script_data": [], - "inputs": [], + "policies": { + "bits": "GasPrice", + "values": [0,0,0,0] + }, + "inputs": [ + { + "CoinSigned": { + "utxo_id": { + "tx_id": "c49d65de61cf04588a764b557d25cc6c6b4bc0d7429227e2a21e61c213b3a3e2", + "output_index": 18 + }, + "owner": "f1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e", + "amount": 10599410012256088338, + "asset_id": "2cafad611543e0265d89f1c2b60d9ebf5d56ad7e23d9827d6b522fd4d6e44bc3", + "tx_pointer": { + "block_height": 0, + "tx_index": 0 + }, + "witness_index": 0, + "maturity": 0, + "predicate_gas_used": null, + "predicate": null, + "predicate_data": null + } + } + ], "outputs": [], - "witnesses": [], + "witnesses": [ + { + "data": [ + 156,254,34,102,65,96,133,170,254,105,147,35,196,199,179,133,132,240,208,149,11,46,30,96,44,91,121,195,145,184,159,235,117,82,135,41,84,154,102,61,61,16,99,123,58,173,75,226,219,139,62,33,41,176,16,18,132,178,8,125,130,169,32,108 + ] + } + ], "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" } } ``` -However, the key `script` in should contain the actual bytecode to execute, i.e. the contents of `out/debug/dbg_example.bin` as a JSON array. The following command can be used to generate it: +However, the key `script` should contain the actual bytecode to execute, i.e. the contents of `out/debug/dbg_example.bin` as a JSON array. The following command can be used to generate it: ```bash python3 -c 'print(list(open("out/debug/dbg_example.bin", "rb").read()))' ``` -So now we replace the script array with the result, and save it as `tx.json`. It looks something like this: - -```json -{ - "Script": { - "byte_price": 0, - "gas_price": 0, - "gas_limit": 1000000, - "maturity": 0, - "script": [144, 0, 0, 4, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 93, 252, 192, 1, 16, 255, 243, 0, 26, 80, 80, 0, 145, 0, 0, 24, 80, 65, 64, 8, 93, 67, 240, 0, 95, 81, 0, 1, 80, 65, 64, 0, 93, 67, 240, 1, 95, 81, 0, 0, 80, 65, 64, 0, 93, 69, 64, 0, 93, 67, 240, 2, 22, 65, 20, 0, 115, 64, 0, 20, 144, 0, 0, 34, 80, 65, 64, 0, 80, 65, 64, 0, 93, 69, 64, 0, 93, 67, 240, 0, 16, 65, 4, 64, 95, 81, 0, 0, 80, 65, 64, 8, 80, 65, 64, 8, 93, 69, 64, 1, 80, 65, 64, 0, 93, 65, 64, 0, 27, 65, 20, 0, 95, 81, 0, 1, 144, 0, 0, 14, 80, 65, 64, 8, 93, 65, 64, 1, 144, 0, 0, 37, 93, 71, 240, 3, 19, 69, 16, 0, 115, 68, 0, 41, 144, 0, 0, 43, 51, 64, 0, 0, 144, 0, 0, 49, 93, 79, 240, 4, 80, 69, 64, 16, 95, 81, 48, 2, 80, 69, 64, 16, 93, 69, 64, 2, 52, 0, 4, 17, 93, 67, 240, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8], - "script_data": [], - "inputs": [], - "outputs": [], - "witnesses": [], - "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" - } -} -``` +So now we replace the script array with the result, and save it as `tx.json`. ## Using the debugger @@ -168,9 +138,9 @@ Now we can actually execute the script: ```text >> start_tx tx.json -Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } -Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } -Receipt: ScriptResult { result: Success, gas_used: 1302 } +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10380, is: 10336 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10384, is: 10336 } +Receipt: ScriptResult { result: Success, gas_used: 60 } Terminated ``` @@ -195,7 +165,7 @@ reg[0x9] = 1000000 # ggas >> memory 0x10 0x8 - 000010: dc dd a0 56 c2 20 1c 6b + 000010: e9 5c 58 86 c8 87 26 dd ``` However, that's not too interesting either, so let's just execute until the end, and then reset the vm to remove the breakpoints. @@ -203,8 +173,8 @@ However, that's not too interesting either, so let's just execute until the end, ``` >> continue -Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } -Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10380, is: 10336 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10384, is: 10336 } Terminated >> reset @@ -214,28 +184,28 @@ Terminated Next, we will setup a breakpoint to check the state on each iteration of the `while` loop. For instance, if we'd like to see what numbers get multiplied together, we could set up a breakpoint before the operation. The bytecode has only a single `MUL` instruction: ``` - half-word byte op raw notes - 31 124 MUL(16, 17, 16) 1b 41 14 00 + half-word byte op raw notes + 14 56 MUL { ra: 18, rb: 18, rc: 17 } 1b 49 24 40 ``` -We can set a breakpoint on its address, at halfword-offset `31`. +We can set a breakpoint on its address, at halfword-offset `14`. ``` ->>> breakpoint 31 +>>> breakpoint 14 >> start_tx tx.json -Receipt: ScriptResult { result: Success, gas_used: 287 } -Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 +Receipt: ScriptResult { result: Success, gas_used: 9 } +Stopped on breakpoint at address 56 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 ``` -Now we can inspect the inputs tu multiply. Looking at [the specification](https://github.com/FuelLabs/fuel-specs/blob/master/specs/vm/instruction_set.md#mul-multiply) tells us that the instruction `MUL(16, 17, 16)` means `reg[16] = reg[17] * reg[16]`. So inpecting the inputs tells us that +Now we can inspect the inputs tu multiply. Looking at [the specification](https://github.com/FuelLabs/fuel-specs/blob/master/src/fuel-vm/instruction-set.md#mul-multiply) tells us that the instruction `MUL { ra: 18, rb: 18, rc: 17 }` means `reg[18] = reg[18] * reg[17]`. So inpecting the inputs tells us that ``` ->> r 16 17 +>> r 18 17 -reg[0x10] = 1 # reg16 +reg[0x12] = 1 # reg18 reg[0x11] = 1 # reg17 ``` @@ -244,12 +214,12 @@ So on the first round the numbers are `1` and `1`, so we can continue to the nex ``` >> c -Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 +Stopped on breakpoint at address 56 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 ->> r 16 17 +>> r 18 17 -reg[0x10] = 2 # reg16 -reg[0x11] = 1 # reg17 +reg[0x12] = 1 # reg18 +reg[0x11] = 2 # reg17 ``` @@ -258,13 +228,12 @@ And the next one: ``` >> c -Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 - ->> r 16 17 +Stopped on breakpoint at address 56 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 -reg[0x10] = 3 # reg16 -reg[0x11] = 2 # reg17 +>> r 18 17 +reg[0x12] = 2 # reg18 +reg[0x11] = 3 # reg17 ``` And fourth one: @@ -272,12 +241,12 @@ And fourth one: ``` >> c -Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 +Stopped on breakpoint at address 56 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 ->> r 16 17 +>> r 18 17 -reg[0x10] = 4 # reg16 -reg[0x11] = 6 # reg17 +reg[0x12] = 6 # reg18 +reg[0x11] = 4 # reg17 ``` @@ -286,18 +255,18 @@ And round 5: ``` >> c -Stopped on breakpoint at address 124 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 +Stopped on breakpoint at address 56 of contract 0x0000000000000000000000000000000000000000000000000000000000000000 ->> r 16 17 +>> r 18 17 -reg[0x10] = 5 # reg16 -reg[0x11] = 24 # reg17 +reg[0x12] = 24 # reg18 +reg[0x11] = 5 # reg17 ``` At this point we can look at the values -16 | 17 +17 | 18 ---|---- 1 | 1 2 | 1 @@ -305,12 +274,12 @@ At this point we can look at the values 4 | 6 5 | 24 -From this we can clearly see that the left side, register `16` is the `counter` variable, and register `17` is `result`. Now the counter equals the given factorial function argument `5`, and the loop terminates. So when we continue, the program finishes without encountering any more breakpoints: +From this we can clearly see that the left side, register `17` is the `counter` variable, and register `18` is `result`. Now the counter equals the given factorial function argument `5`, and the loop terminates. So when we continue, the program finishes without encountering any more breakpoints: ``` >> c -Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10516, is: 10352 } -Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10552, is: 10352 } +Receipt: Log { id: 0000000000000000000000000000000000000000000000000000000000000000, ra: 120, rb: 0, rc: 0, rd: 0, pc: 10380, is: 10336 } +Receipt: Return { id: 0000000000000000000000000000000000000000000000000000000000000000, val: 0, pc: 10384, is: 10336 } Terminated ``` diff --git a/examples/example_tx.json b/examples/example_tx.json index 6ef39a0a8d5..607c5b059f5 100755 --- a/examples/example_tx.json +++ b/examples/example_tx.json @@ -1,14 +1,187 @@ { "Script": { - "byte_price": 0, - "gas_price": 0, - "gas_limit": 1000000, - "maturity": 0, - "script": [80,64,0,202,80,68,0,186,51,65,16,0,36,4,0,0], + "script_gas_limit": 1000000, + "script": [ + 144, + 0, + 0, + 4, + 71, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 68, + 93, + 252, + 192, + 1, + 16, + 255, + 243, + 0, + 26, + 72, + 16, + 0, + 26, + 68, + 0, + 0, + 93, + 67, + 240, + 0, + 22, + 65, + 20, + 0, + 115, + 64, + 0, + 13, + 51, + 72, + 0, + 0, + 36, + 0, + 0, + 0, + 16, + 69, + 16, + 64, + 27, + 73, + 36, + 64, + 144, + 0, + 0, + 8, + 71, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 5 + ], "script_data": [], - "inputs": [], + "policies": { + "bits": "GasPrice", + "values": [ + 0, + 0, + 0, + 0 + ] + }, + "inputs": [ + { + "CoinSigned": { + "utxo_id": { + "tx_id": "c49d65de61cf04588a764b557d25cc6c6b4bc0d7429227e2a21e61c213b3a3e2", + "output_index": 18 + }, + "owner": "f1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e", + "amount": 10599410012256088338, + "asset_id": "2cafad611543e0265d89f1c2b60d9ebf5d56ad7e23d9827d6b522fd4d6e44bc3", + "tx_pointer": { + "block_height": 0, + "tx_index": 0 + }, + "witness_index": 0, + "maturity": 0, + "predicate_gas_used": null, + "predicate": null, + "predicate_data": null + } + } + ], "outputs": [], - "witnesses": [], + "witnesses": [ + { + "data": [ + 156, + 254, + 34, + 102, + 65, + 96, + 133, + 170, + 254, + 105, + 147, + 35, + 196, + 199, + 179, + 133, + 132, + 240, + 208, + 149, + 11, + 46, + 30, + 96, + 44, + 91, + 121, + 195, + 145, + 184, + 159, + 235, + 117, + 82, + 135, + 41, + 84, + 154, + 102, + 61, + 61, + 16, + 99, + 123, + 58, + 173, + 75, + 226, + 219, + 139, + 62, + 33, + 41, + 176, + 16, + 18, + 132, + 178, + 8, + 125, + 130, + 169, + 32, + 108 + ] + } + ], "receipts_root": "0000000000000000000000000000000000000000000000000000000000000000" } } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index dd944d740c7..7ff2becbf13 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ pub mod names; // Re-exports -pub use fuel_gql_client::client::{schema::RunResult, FuelClient}; +pub use fuel_core_client::client::{schema::RunResult, FuelClient}; pub use fuel_vm::prelude::{ContractId, Transaction}; diff --git a/src/main.rs b/src/main.rs index 799b1b7762d..ac88485745e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -152,7 +152,7 @@ async fn cmd_step(state: &mut State, mut args: Vec) -> Result<(), Box) -> Result<(), B if args.is_empty() { for r in 0..VM_REGISTER_COUNT { - let value = state.client.register(&state.session_id, r).await?; + let value = state.client.register(&state.session_id, r as u32).await?; println!("reg[{:#x}] = {:<8} # {}", r, value, register_name(r)); } } else { for arg in &args { if let Some(v) = parse_int(arg) { if v < VM_REGISTER_COUNT { - let value = state.client.register(&state.session_id, v).await?; + let value = state.client.register(&state.session_id, v as u32).await?; println!("reg[{:#02x}] = {:<8} # {}", v, value, register_name(v)); } else { println!("Register index too large {}", v); return Ok(()); } } else if let Some(index) = names::register_index(arg) { - let value = state.client.register(&state.session_id, index).await?; + let value = state + .client + .register(&state.session_id, index as u32) + .await?; println!("reg[{:#02x}] = {:<8} # {}", index, value, arg); } else { println!("Unknown register name {}", arg); @@ -245,7 +248,7 @@ async fn cmd_memory(state: &mut State, mut args: Vec) -> Result<(), Box< let mem = state .client - .memory(&state.session_id, offset, limit) + .memory(&state.session_id, offset as u32, limit as u32) .await?; for (i, chunk) in mem.chunks(WORD_SIZE).enumerate() { diff --git a/tests/cli_integration.rs b/tests/cli_integration.rs index 62ed740ce40..952968b5165 100755 --- a/tests/cli_integration.rs +++ b/tests/cli_integration.rs @@ -9,6 +9,8 @@ fn test_cli() { let port = portpicker::pick_unused_port().expect("No ports free"); let mut fuel_core = Command::new("fuel-core") + .arg("run") + .arg("--debug") .arg("--db-type") .arg("in-memory") .arg("--port") @@ -43,7 +45,7 @@ fn test_cli() { cmd.send_line("step on").unwrap(); cmd.exp_regex(r">> ").unwrap(); cmd.send_line("continue").unwrap(); - cmd.exp_regex(r"Stopped on breakpoint at address 4 of contract 0x0{64}") + cmd.exp_regex(r"Stopped on breakpoint at address 16 of contract 0x0{64}") .unwrap(); cmd.send_line("step off").unwrap(); cmd.exp_regex(r">> ").unwrap(); From 747dbd9c635d6455a2661789414149153c7124b9 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 14:47:45 -0800 Subject: [PATCH 09/19] Add fuel-debugger as a forc plugin --- .github/workflows/ci.yml | 10 +- .github/workflows/gh-pages.yml | 1 + .gitignore | 3 + Cargo.lock | 1311 +++++++++++++++-- Cargo.toml | 1 + .../book/src/sway-program-types/predicates.md | 2 +- .../misc/workarounds/predicates.md | 2 +- .../forc-debug/.github/workflows/ci.yml | 107 -- .../.github/workflows/nightly-cargo-audit.yml | 14 - .../.github/workflows/scripts/verify_tag.sh | 35 - forc-plugins/forc-debug/.gitignore | 5 - forc-plugins/forc-debug/Cargo.toml | 11 +- forc-plugins/forc-debug/README.md | 2 +- forc-plugins/forc-debug/docs/walkthrough.md | 2 +- .../forc-debug/tests/cli_integration.rs | 2 +- 15 files changed, 1213 insertions(+), 295 deletions(-) delete mode 100755 forc-plugins/forc-debug/.github/workflows/ci.yml delete mode 100755 forc-plugins/forc-debug/.github/workflows/nightly-cargo-audit.yml delete mode 100755 forc-plugins/forc-debug/.github/workflows/scripts/verify_tag.sh delete mode 100644 forc-plugins/forc-debug/.gitignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9f95c53bae..368406bdc2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,6 +113,7 @@ jobs: cargo install --locked --debug --path ./forc-plugins/forc-fmt cargo install --locked --debug --path ./forc-plugins/forc-lsp cargo install --locked --debug --path ./forc-plugins/forc-client + cargo install --locked --debug --path ./forc-plugins/forc-debug cargo install --locked --debug --path ./forc-plugins/forc-doc cargo install --locked --debug --path ./forc-plugins/forc-tx cargo install --locked --debug --path ./forc-plugins/forc-crypto @@ -471,6 +472,7 @@ jobs: ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-pkg/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-client/Cargo.toml + ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-debug/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-doc/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-fmt/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-lsp/Cargo.toml @@ -739,13 +741,13 @@ jobs: - name: Strip release binaries x86_64-linux-gnu if: matrix.job.target == 'x86_64-unknown-linux-gnu' run: | - for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do + for BINARY in forc forc-fmt forc-lsp forc-debug forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do strip "target/${{ matrix.job.target }}/release/$BINARY" done - name: Strip release binaries aarch64-linux-gnu if: matrix.job.target == 'aarch64-unknown-linux-gnu' run: | - for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do + for BINARY in forc forc-fmt forc-lsp forc-debug forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do docker run --rm -v \ "$PWD/target:/target:Z" \ ghcr.io/cross-rs/${{ matrix.job.target }}:main \ @@ -755,7 +757,7 @@ jobs: - name: Strip release binaries mac if: matrix.job.os == 'macos-latest' run: | - for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do + for BINARY in forc forc-fmt forc-lsp forc-debug forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do strip -x "target/${{ matrix.job.target }}/release/$BINARY" done @@ -769,7 +771,7 @@ jobs: ZIP_FILE_NAME=forc-binaries-${{ env.PLATFORM_NAME }}_${{ env.ARCH }}.tar.gz echo "ZIP_FILE_NAME=$ZIP_FILE_NAME" >> $GITHUB_ENV mkdir -pv ./forc-binaries - for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do + for BINARY in forc forc-fmt forc-lsp forc-debug forc-deploy forc-run forc-doc forc-crypto forc-tx forc-submit; do cp "target/${{ matrix.job.target }}/release/$BINARY" ./forc-binaries done tar -czvf $ZIP_FILE_NAME ./forc-binaries diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index dc8b6dc0c3f..fa2ac16b866 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -28,6 +28,7 @@ jobs: cargo install --locked --debug --path ./forc-plugins/forc-fmt cargo install --locked --debug --path ./forc-plugins/forc-lsp cargo install --locked --debug --path ./forc-plugins/forc-client + cargo install --locked --debug --path ./forc-plugins/forc-debug cargo install --locked --debug --path ./forc-plugins/forc-doc cargo install --locked --debug --path ./forc-plugins/forc-crypto cargo install --locked --debug forc-explore diff --git a/.gitignore b/.gitignore index 5a70f037099..61b5a553009 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,8 @@ out # Benchmarks data output directory benchmarks/ +# Generated client schema +**/schema.graphql + # .DS_Store .DS_Store \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 10e2139d624..f8ffd6acc24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,24 +27,78 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", +] + [[package]] name = "aes" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ - "cfg-if", - "cipher", + "cfg-if 1.0.0", + "cipher 0.4.4", "cpufeatures", ] +[[package]] +name = "aes-gcm" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" +dependencies = [ + "aead", + "aes 0.6.0", + "cipher 0.2.5", + "ctr 0.6.0", + "ghash", + "subtle", +] + +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug", +] + [[package]] name = "ahash" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.11", "once_cell", "version_check", @@ -221,6 +275,150 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +dependencies = [ + "concurrent-queue", + "event-listener 4.0.0", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.2.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 2.1.0", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.1.1", + "async-executor", + "async-io 2.2.2", + "async-lock 3.2.0", + "blocking", + "futures-lite 2.1.0", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +dependencies = [ + "async-lock 3.2.0", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite 2.1.0", + "parking", + "polling 3.3.1", + "rustix 0.38.26", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-std" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite 1.13.0", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-task" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" + [[package]] name = "async-trait" version = "0.1.74" @@ -241,6 +439,12 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -279,7 +483,7 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes", + "bytes 1.5.0", "futures-util", "http", "http-body", @@ -308,7 +512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" dependencies = [ "async-trait", - "bytes", + "bytes 1.5.0", "futures-util", "http", "http-body", @@ -325,7 +529,7 @@ checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -477,7 +681,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", - "cfg-if", + "cfg-if 1.0.0", "constant_time_eq 0.3.0", ] @@ -499,6 +703,22 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blocking" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel 2.1.1", + "async-lock 3.2.0", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.1.0", + "piper", + "tracing", +] + [[package]] name = "brotli" version = "3.4.0" @@ -559,6 +779,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + [[package]] name = "bytes" version = "1.5.0" @@ -584,6 +810,12 @@ dependencies = [ "libc", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -645,6 +877,15 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array", +] + [[package]] name = "cipher" version = "0.4.4" @@ -768,6 +1009,17 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + [[package]] name = "cobs" version = "0.2.3" @@ -801,7 +1053,7 @@ dependencies = [ "hmac 0.12.1", "once_cell", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "sha2 0.10.8", "thiserror", ] @@ -862,13 +1114,13 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baee326bc603965b0f26583e1ecd7c111c41b49bd92a344897476a352798869" dependencies = [ - "bytes", + "bytes 1.5.0", "futures-core", "futures-util", "http", "mime", "mime_guess", - "rand", + "rand 0.8.5", "thiserror", ] @@ -893,6 +1145,15 @@ dependencies = [ "xdg", ] +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console" version = "0.15.7" @@ -911,6 +1172,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "const_fn" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -929,6 +1196,23 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "cookie" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" +dependencies = [ + "aes-gcm", + "base64 0.13.1", + "hkdf 0.10.0", + "hmac 0.10.1", + "percent-encoding", + "rand 0.8.5", + "sha2 0.9.9", + "time 0.2.27", + "version_check", +] + [[package]] name = "cookie" version = "0.16.2" @@ -936,7 +1220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time", + "time 0.3.30", "version_check", ] @@ -946,14 +1230,14 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" dependencies = [ - "cookie", + "cookie 0.16.2", "idna 0.2.3", "log", "publicsuffix", "serde", "serde_derive", "serde_json", - "time", + "time 0.3.30", "url", ] @@ -1006,13 +1290,19 @@ dependencies = [ "libc", ] +[[package]] +name = "cpuid-bool" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" + [[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1063,7 +1353,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -1073,7 +1363,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -1085,7 +1375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "memoffset 0.9.0", "scopeguard", @@ -1097,7 +1387,7 @@ version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1113,7 +1403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1138,6 +1428,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "crypto-mac" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +dependencies = [ + "generic-array", + "subtle", +] + [[package]] name = "csv" version = "1.3.0" @@ -1168,13 +1468,53 @@ dependencies = [ "sct 0.6.1", ] +[[package]] +name = "ctr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +dependencies = [ + "cipher 0.2.5", +] + [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "curl" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2 0.4.10", + "winapi", +] + +[[package]] +name = "curl-sys" +version = "0.4.70+curl-8.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" +dependencies = [ + "cc", + "libc", + "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "windows-sys 0.48.0", ] [[package]] @@ -1183,13 +1523,13 @@ version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle", ] @@ -1320,7 +1660,7 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.3", "lock_api", "once_cell", @@ -1393,7 +1733,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -1482,7 +1822,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -1508,6 +1848,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "dissimilar" version = "1.0.7" @@ -1598,7 +1944,7 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -1628,9 +1974,15 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + [[package]] name = "entities" version = "1.0.1" @@ -1679,19 +2031,51 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "error-chain" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" +dependencies = [ + "backtrace", + "version_check", +] + +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + +[[package]] +name = "escargot" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "768064bd3a0e2bedcba91dc87ace90beea91acc41b6a01a3ca8e9aa8827461bf" +dependencies = [ + "log", + "once_cell", + "serde", + "serde_json", +] + [[package]] name = "eth-keystore" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes", - "ctr", + "aes 0.8.3", + "ctr 0.9.2", "digest 0.10.7", "hex", "hmac 0.12.1", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "scrypt", "serde", "serde_json", @@ -1734,6 +2118,33 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.0", + "pin-project-lite", +] + [[package]] name = "eventsource-client" version = "0.10.2" @@ -1780,20 +2191,39 @@ dependencies = [ "regex", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fd-lock" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0010f02effd88c702318c5dde0463206be67495d0b4d906ba7c0a8f166cc7f06" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "fd-lock" version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93f7a0db71c99f68398f80653ed05afb0b00e062e1a20c7ff849c4edfabbbcc" dependencies = [ - "cfg-if", - "rustix", + "cfg-if 1.0.0", + "rustix 0.38.26", "windows-sys 0.52.0", ] @@ -1803,7 +2233,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -1840,7 +2270,7 @@ version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.4.1", "windows-sys 0.52.0", @@ -1853,7 +2283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -1874,6 +2304,17 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "flume" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bebadab126f8120d410b677ed95eee4ba6eb7c6dd8e34a5ec88a08050e26132" +dependencies = [ + "futures-core", + "futures-sink", + "spinning_top", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1937,7 +2378,7 @@ dependencies = [ "fuels-core", "futures", "hex", - "rand", + "rand 0.8.5", "rpassword", "serde", "serde_json", @@ -1963,7 +2404,7 @@ dependencies = [ "futures", "hex", "libp2p-identity", - "rand", + "rand 0.8.5", "serde", "serde_json", "serde_yaml", @@ -1973,6 +2414,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "forc-debug" +version = "0.48.1" +dependencies = [ + "anyhow", + "clap 3.2.25", + "escargot", + "fuel-core-client", + "fuel-types", + "fuel-vm", + "portpicker", + "rexpect", + "serde_json", + "shellfish", + "surf", + "thiserror", + "tokio", +] + [[package]] name = "forc-doc" version = "0.48.1" @@ -2044,7 +2504,7 @@ dependencies = [ "petgraph", "regex", "reqwest", - "semver", + "semver 1.0.20", "serde", "serde_ignored", "serde_json", @@ -2071,7 +2531,7 @@ dependencies = [ "fuel-abi-types 0.2.1", "fuel-tx", "fuel-vm", - "rand", + "rand 0.8.5", "rayon", "sway-core", "sway-types", @@ -2110,7 +2570,7 @@ dependencies = [ "anyhow", "clap 3.2.25", "dirs 3.0.2", - "fd-lock", + "fd-lock 4.0.1", "forc-tracing", "fuel-tx", "hex", @@ -2141,7 +2601,7 @@ dependencies = [ "futures", "hex", "home", - "rand", + "rand 0.8.5", "rpassword", "serde_json", "termion", @@ -2373,7 +2833,7 @@ dependencies = [ "k256", "lazy_static", "p256", - "rand", + "rand 0.8.5", "secp256k1 0.26.0", "serde", "sha2 0.10.8", @@ -2432,7 +2892,7 @@ dependencies = [ "num-bigint", "pest", "pest_derive", - "rand", + "rand 0.8.5", "sha3", "snafu", ] @@ -2499,7 +2959,7 @@ dependencies = [ "fuel-types", "hashbrown 0.14.3", "itertools 0.10.5", - "rand", + "rand 0.8.5", "serde", "serde_json", "strum", @@ -2514,7 +2974,7 @@ checksum = "ee3eda536ec1c1c7b0e06bf4a2d7b22980a79108c66ab8f81661433b2211e21e" dependencies = [ "fuel-derive", "hex", - "rand", + "rand 0.8.5", "serde", ] @@ -2542,7 +3002,7 @@ dependencies = [ "paste", "percent-encoding", "primitive-types", - "rand", + "rand 0.8.5", "serde", "sha3", "static_assertions", @@ -2582,8 +3042,8 @@ dependencies = [ "fuel-vm", "fuels-core", "hex", - "rand", - "semver", + "rand 0.8.5", + "semver 1.0.20", "tai64", "thiserror", "tokio", @@ -2645,7 +3105,7 @@ dependencies = [ "itertools 0.12.0", "proc-macro2", "quote", - "rand", + "rand 0.8.5", "syn 2.0.39", ] @@ -2656,7 +3116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d9fd3a7722685ba45a6794374f44530732f4f2f43f507eb1ec6fd0656abacf8" dependencies = [ "async-trait", - "bytes", + "bytes 1.5.0", "fuel-abi-types 0.3.0", "fuel-asm", "fuel-tx", @@ -2664,7 +3124,7 @@ dependencies = [ "fuels-accounts", "fuels-core", "itertools 0.12.0", - "rand", + "rand 0.8.5", "serde_json", "tokio", ] @@ -2686,7 +3146,7 @@ dependencies = [ "futures", "hex", "portpicker", - "rand", + "rand 0.8.5", "serde", "serde_json", "serde_with 3.4.0", @@ -2749,6 +3209,34 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -2806,7 +3294,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2826,7 +3314,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -2837,11 +3325,21 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "ghash" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" version = "0.28.1" @@ -2914,6 +3412,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "graph-cycles" version = "0.1.0" @@ -2942,7 +3452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2952,7 +3462,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ - "bytes", + "bytes 1.5.0", "fnv", "futures-core", "futures-sink", @@ -3034,7 +3544,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32", - "rustc_version", + "rustc_version 0.4.0", "serde", "spin 0.9.8", "stable_deref_trait", @@ -3079,6 +3589,16 @@ dependencies = [ "serde", ] +[[package]] +name = "hkdf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" +dependencies = [ + "digest 0.9.0", + "hmac 0.10.1", +] + [[package]] name = "hkdf" version = "0.12.3" @@ -3094,7 +3614,17 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac", + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.0", "digest 0.9.0", ] @@ -3139,7 +3669,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "bytes", + "bytes 1.5.0", "fnv", "itoa", ] @@ -3150,17 +3680,53 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes", + "bytes 1.5.0", "http", "pin-project-lite", ] +[[package]] +name = "http-client" +version = "6.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5" +dependencies = [ + "async-std", + "async-trait", + "cfg-if 1.0.0", + "http-types", + "isahc", + "log", +] + [[package]] name = "http-range-header" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +[[package]] +name = "http-types" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" +dependencies = [ + "anyhow", + "async-channel 1.9.0", + "async-std", + "base64 0.13.1", + "cookie 0.14.4", + "futures-lite 1.13.0", + "infer", + "pin-project-lite", + "rand 0.7.3", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "url", +] + [[package]] name = "httparse" version = "1.8.0" @@ -3185,7 +3751,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes", + "bytes 1.5.0", "futures-channel", "futures-core", "futures-util", @@ -3209,7 +3775,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0eb2cf73e96e9925f4bed948e763aa2901c2f1a3a5f713ee41917433ced6671" dependencies = [ - "bytes", + "bytes 1.5.0", "common-multipart-rfc7578", "futures-core", "http", @@ -3268,7 +3834,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes", + "bytes 1.5.0", "hyper", "native-tls", "tokio", @@ -3342,7 +3908,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core", + "rand_core 0.6.4", "rand_xoshiro", "sized-chunks", "typenum", @@ -3428,6 +3994,12 @@ dependencies = [ "serde", ] +[[package]] +name = "infer" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" + [[package]] name = "inotify" version = "0.9.6" @@ -3478,7 +4050,18 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.3", + "libc", + "windows-sys 0.48.0", ] [[package]] @@ -3489,7 +4072,7 @@ checksum = "8a9d131b408b4caafe1e7c00d410a09ad3eb7e3ab68690cf668e86904b2176b4" dependencies = [ "async-trait", "base64 0.13.1", - "bytes", + "bytes 1.5.0", "futures", "http", "hyper", @@ -3505,8 +4088,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b74065805db266ba2c6edbd670b23c4714824a955628472b2e46cc9f3a869cb" dependencies = [ "async-trait", - "bytes", - "cfg-if", + "bytes 1.5.0", + "cfg-if 1.0.0", "common-multipart-rfc7578", "dirs 4.0.0", "futures", @@ -3537,10 +4120,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix", + "rustix 0.38.26", "windows-sys 0.48.0", ] +[[package]] +name = "isahc" +version = "0.9.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2948a0ce43e2c2ef11d7edf6816508998d99e13badd1150be0914205df9388a" +dependencies = [ + "bytes 0.5.6", + "crossbeam-utils", + "curl", + "curl-sys", + "flume", + "futures-lite 1.13.0", + "http", + "log", + "once_cell", + "slab", + "sluice", + "tracing", + "tracing-futures", + "url", + "waker-fn", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3589,7 +4195,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ecdsa", "elliptic-curve", "once_cell", @@ -3626,6 +4232,15 @@ dependencies = [ "libc", ] +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -3661,6 +4276,16 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libnghttp2-sys" +version = "0.1.8+1.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fae956c192dadcdb5dace96db71fa0b827333cce7c7b38dc71446f024d8a340" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "libp2p-identity" version = "0.2.8" @@ -3669,7 +4294,7 @@ checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ "asn1_der", "bs58", - "hkdf", + "hkdf 0.12.3", "libsecp256k1", "multihash 0.19.1", "quick-protobuf", @@ -3714,7 +4339,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand", + "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", @@ -3790,6 +4415,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -3811,6 +4442,9 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +dependencies = [ + "value-bag", +] [[package]] name = "logos" @@ -3903,7 +4537,7 @@ dependencies = [ "anyhow", "clap 3.2.25", "mdbook", - "semver", + "semver 1.0.20", "serde", "serde_json", ] @@ -4169,6 +4803,40 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "nix" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if 0.1.10", + "libc", + "void", +] + +[[package]] +name = "nix" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if 1.0.0", + "libc", +] + [[package]] name = "normpath" version = "1.1.1" @@ -4416,7 +5084,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ "bitflags 2.4.1", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -4528,6 +5196,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" version = "0.11.2" @@ -4555,7 +5229,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall 0.2.16", @@ -4569,7 +5243,7 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.4.1", "smallvec", @@ -4715,7 +5389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared", - "rand", + "rand 0.8.5", ] [[package]] @@ -4773,6 +5447,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -4806,7 +5491,7 @@ dependencies = [ "line-wrap", "quick-xml", "serde", - "time", + "time 0.3.30", ] [[package]] @@ -4829,12 +5514,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] -name = "plotters-svg" -version = "0.3.5" +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if 1.0.0", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.26", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "polyval" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" dependencies = [ - "plotters-backend", + "cpuid-bool", + "opaque-debug", + "universal-hash", ] [[package]] @@ -4843,7 +5569,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand", + "rand 0.8.5", ] [[package]] @@ -5117,6 +5843,29 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -5124,8 +5873,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] @@ -5135,7 +5894,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -5147,13 +5915,22 @@ dependencies = [ "getrandom 0.2.11", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "rand_xoshiro" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -5285,8 +6062,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "base64 0.21.5", - "bytes", - "cookie", + "bytes 1.5.0", + "cookie 0.16.2", "cookie_store", "encoding_rs", "futures-core", @@ -5331,7 +6108,7 @@ checksum = "73d84c8f9836efb0f5f5f8de4700a953c4e1f3119e5cfcb0aad8e5be73daf991" dependencies = [ "arrayref", "auto_impl", - "bytes", + "bytes 1.5.0", "hashbrown 0.13.2", "num_enum", "primitive-types", @@ -5346,7 +6123,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0353d456ef3e989dc9190f42c6020f09bc2025930c37895826029304413204b5" dependencies = [ - "bytes", + "bytes 1.5.0", "hashbrown 0.13.2", "num", "once_cell", @@ -5358,6 +6135,18 @@ dependencies = [ "substrate-bn", ] +[[package]] +name = "rexpect" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862c0149d91461fab225ddd06a5af919913f5c57405ed4f27d2466d6cc877186" +dependencies = [ + "error-chain", + "nix 0.14.1", + "regex", + "tempfile", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -5412,7 +6201,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes", + "bytes 1.5.0", "rustc-hex", ] @@ -5501,13 +6290,36 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.20", +] + +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", ] [[package]] @@ -5519,7 +6331,7 @@ dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.12", "windows-sys 0.52.0", ] @@ -5597,6 +6409,30 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rustyline" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd4eaf7a7738f76c98e4f0395253ae853be3eb018f7b0bb57fe1b6c17e31874" +dependencies = [ + "bitflags 1.3.2", + "cfg-if 1.0.0", + "clipboard-win", + "dirs-next", + "fd-lock 2.0.0", + "libc", + "log", + "memchr", + "nix 0.20.0", + "radix_trie", + "scopeguard", + "smallvec", + "unicode-segmentation", + "unicode-width", + "utf8parse", + "winapi", +] + [[package]] name = "ryu" version = "1.0.15" @@ -5615,7 +6451,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -5729,7 +6565,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" dependencies = [ - "rand", + "rand 0.8.5", "secp256k1-sys 0.8.1", ] @@ -5783,6 +6619,15 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.20" @@ -5792,6 +6637,12 @@ dependencies = [ "serde", ] +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" version = "1.0.193" @@ -5832,6 +6683,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_qs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" +dependencies = [ + "percent-encoding", + "serde", + "thiserror", +] + [[package]] name = "serde_repr" version = "0.1.17" @@ -5888,7 +6750,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros 3.4.0", - "time", + "time 0.3.30", ] [[package]] @@ -5928,6 +6790,21 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + [[package]] name = "sha2" version = "0.9.9" @@ -5935,7 +6812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -5947,7 +6824,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -5977,6 +6854,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellfish" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c66e6fc7a668d89939ee241fb342f401f8c11a80da8fb72fd14681f8d47440b" +dependencies = [ + "async-trait", + "cfg-if 1.0.0", + "rustyline", + "tokio", + "yansi", +] + [[package]] name = "shlex" version = "1.2.0" @@ -5999,7 +6889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6043,6 +6933,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "sluice" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" +dependencies = [ + "async-channel 1.9.0", + "futures-core", + "futures-io", +] + [[package]] name = "smallvec" version = "1.11.2" @@ -6113,6 +7014,15 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spinning_top" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b9eb1a2f4c41445a3a0ff9abc5221c5fcd28e1f13cd7c0397706f9ac938ddb0" +dependencies = [ + "lock_api", +] + [[package]] name = "spki" version = "0.7.3" @@ -6129,12 +7039,76 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "standback" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +dependencies = [ + "version_check", +] + [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version 0.2.3", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn 1.0.109", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn 1.0.109", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "str_indices" version = "0.4.3" @@ -6220,7 +7194,7 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand", + "rand 0.8.5", "rustc-hex", ] @@ -6230,6 +7204,29 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "surf" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718b1ae6b50351982dedff021db0def601677f2120938b070eadb10ba4038dd7" +dependencies = [ + "async-std", + "async-trait", + "cfg-if 1.0.0", + "encoding_rs", + "futures-util", + "getrandom 0.2.11", + "http-client", + "http-types", + "log", + "mime_guess", + "once_cell", + "pin-project-lite", + "serde", + "serde_json", + "web-sys", +] + [[package]] name = "sway-ast" version = "0.48.1" @@ -6334,7 +7331,7 @@ dependencies = [ "criterion", "dashmap", "dirs 4.0.0", - "fd-lock", + "fd-lock 4.0.1", "forc-pkg", "forc-tracing", "forc-util", @@ -6528,7 +7525,7 @@ version = "0.29.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "core-foundation-sys", "libc", "ntapi", @@ -6584,7 +7581,7 @@ dependencies = [ "logos", "regex", "rowan", - "semver", + "semver 1.0.20", "smallvec", "toml 0.5.11", "wasm-bindgen", @@ -6607,10 +7604,10 @@ version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ - "cfg-if", - "fastrand", + "cfg-if 1.0.0", + "fastrand 2.0.1", "redox_syscall 0.4.1", - "rustix", + "rustix 0.38.26", "windows-sys 0.48.0", ] @@ -6662,7 +7659,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix", + "rustix 0.38.26", "windows-sys 0.48.0", ] @@ -6684,7 +7681,7 @@ version = "0.0.0" dependencies = [ "anyhow", "assert_matches", - "bytes", + "bytes 1.5.0", "clap 4.4.11", "colored", "filecheck", @@ -6699,7 +7696,7 @@ dependencies = [ "hex", "miden", "prettydiff 0.6.4", - "rand", + "rand 0.8.5", "regex", "revm", "serde_json", @@ -6774,7 +7771,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -6798,6 +7795,21 @@ dependencies = [ "tikv-jemalloc-sys", ] +[[package]] +name = "time" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros 0.1.1", + "version_check", + "winapi", +] + [[package]] name = "time" version = "0.3.30" @@ -6809,7 +7821,7 @@ dependencies = [ "powerfmt", "serde", "time-core", - "time-macros", + "time-macros 0.2.15", ] [[package]] @@ -6818,6 +7830,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", +] + [[package]] name = "time-macros" version = "0.2.15" @@ -6827,6 +7849,19 @@ dependencies = [ "time-core", ] +[[package]] +name = "time-macros-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "standback", + "syn 1.0.109", +] + [[package]] name = "tiny-bip39" version = "1.0.0" @@ -6837,7 +7872,7 @@ dependencies = [ "hmac 0.12.1", "once_cell", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "rustc-hash", "sha2 0.10.8", "thiserror", @@ -6887,7 +7922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", - "bytes", + "bytes 1.5.0", "libc", "mio", "num_cpus", @@ -6968,7 +8003,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes", + "bytes 1.5.0", "futures-core", "futures-sink", "pin-project-lite", @@ -7059,7 +8094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "bitflags 1.3.2", - "bytes", + "bytes 1.5.0", "futures-core", "futures-util", "http", @@ -7085,7 +8120,7 @@ checksum = "9b38fb0e6ce037835174256518aace3ca621c4f96383c56bb846cfc11b341910" dependencies = [ "async-trait", "auto_impl", - "bytes", + "bytes 1.5.0", "dashmap", "futures", "httparse", @@ -7150,6 +8185,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -7299,6 +8344,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "universal-hash" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" +dependencies = [ + "generic-array", + "subtle", +] + [[package]] name = "unreachable" version = "1.0.0" @@ -7384,6 +8439,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "value-bag" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" + [[package]] name = "vcpkg" version = "0.2.15" @@ -7414,6 +8475,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + [[package]] name = "walkdir" version = "2.4.0" @@ -7451,7 +8518,7 @@ version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "serde", "serde_json", "wasm-bindgen-macro", @@ -7478,7 +8545,7 @@ version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -7548,7 +8615,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.26", "windows-sys 0.48.0", ] @@ -7815,7 +8882,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] diff --git a/Cargo.toml b/Cargo.toml index 5586e0c2f41..e2d936ef430 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "forc-pkg", "forc-plugins/forc-client", "forc-plugins/forc-crypto", + "forc-plugins/forc-debug", "forc-plugins/forc-doc", "forc-plugins/forc-fmt", "forc-plugins/forc-lsp", diff --git a/docs/book/src/sway-program-types/predicates.md b/docs/book/src/sway-program-types/predicates.md index 4fa7f0c9d11..7229aae22e9 100644 --- a/docs/book/src/sway-program-types/predicates.md +++ b/docs/book/src/sway-program-types/predicates.md @@ -13,6 +13,6 @@ fn main() -> bool { ## Debugging Predicates -Because they don't have any side effects (they are _pure_), predicates cannot create receipts. Therefore, they cannot have logging or create a stack backtrace. This means that there is no native way to debug them aside from using a single-stepping debugger (which is a [work-in-progress](https://github.com/FuelLabs/fuel-debugger/pull/1)). +Because they don't have any side effects (they are _pure_), predicates cannot create receipts. Therefore, they cannot have logging or create a stack backtrace. This means that there is no native way to debug them aside from using a single-stepping debugger. As a workaround, the predicate can be written, tested, and debugged first as a `script`, and then changed back into a `predicate`. diff --git a/docs/reference/src/documentation/misc/workarounds/predicates.md b/docs/reference/src/documentation/misc/workarounds/predicates.md index b44ea9ed059..78de4de6be4 100644 --- a/docs/reference/src/documentation/misc/workarounds/predicates.md +++ b/docs/reference/src/documentation/misc/workarounds/predicates.md @@ -2,6 +2,6 @@ A [predicate](../../language/program-types/predicate.md) does not have any side effects because it is pure and thus it cannot create [receipts](https://github.com/FuelLabs/fuel-specs/blob/master/src/abi/receipts.md). -Since there are no receipts they cannot use logging nor create a stack backtrace for debugging. This means that there is no way to debug them aside from using a single-stepping [debugger](https://github.com/FuelLabs/fuel-debugger). +Since there are no receipts they cannot use logging nor create a stack backtrace for debugging. This means that there is no way to debug them aside from using a single-stepping [debugger](../../../../../../forc-plugins/forc-debug/README.md). As a workaround, the predicate can be written, tested, and debugged first as a [`script`](../../language/program-types/script.md), and then changed back into a `predicate`. diff --git a/forc-plugins/forc-debug/.github/workflows/ci.yml b/forc-plugins/forc-debug/.github/workflows/ci.yml deleted file mode 100755 index 24d1f7c8b7e..00000000000 --- a/forc-plugins/forc-debug/.github/workflows/ci.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: CI - -on: - push: - branches: - - master - pull_request: - release: - types: [published] - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: -D warnings - REGISTRY: ghcr.io - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - # Build caching action - - uses: Swatinem/rust-cache@v1 - - - name: Install rustfmt - run: rustup component add rustfmt - - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all --verbose -- --check - - - name: Check build - uses: actions-rs/cargo@v1 - with: - command: check - args: --verbose --all-targets - - - name: Check Clippy Lints - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --verbose --all-targets - - - name: Install fuel-core for tests - uses: baptiste0928/cargo-install@v2 - with: - crate: fuel-core-bin - version: "0.21" - - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --verbose --all-targets - - - name: Install Cargo.toml linter - uses: baptiste0928/cargo-install@v1 - with: - crate: cargo-toml-lint - version: "0.1" - - - name: Run Cargo.toml linter - run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint - - publish: - # Only do this job if publishing a release - needs: build - if: github.event_name == 'release' && github.event.action == 'published' - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Verify tag version - run: | - cargo install toml-cli - ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} Cargo.toml - ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} client/Cargo.toml - - name: Publish crate - uses: katyo/publish-crates@v1 - with: - publish-delay: 30000 - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - no-verify: false diff --git a/forc-plugins/forc-debug/.github/workflows/nightly-cargo-audit.yml b/forc-plugins/forc-debug/.github/workflows/nightly-cargo-audit.yml deleted file mode 100755 index 6f5ff26fb42..00000000000 --- a/forc-plugins/forc-debug/.github/workflows/nightly-cargo-audit.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Nightly Cargo Audit - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - cargo_audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/forc-plugins/forc-debug/.github/workflows/scripts/verify_tag.sh b/forc-plugins/forc-debug/.github/workflows/scripts/verify_tag.sh deleted file mode 100755 index e029f651988..00000000000 --- a/forc-plugins/forc-debug/.github/workflows/scripts/verify_tag.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -set -e - -err() { - echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2; -} - -status() { - WIDTH=12 - printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" -} - -REF=$1 -MANIFEST=$2 - -if [ -z "$REF" ]; then - err "Expected ref to be set" - exit 1 -fi - -if [ -z "$MANIFEST" ]; then - err "Expected manifest to be set" - exit 1 -fi - -# strip preceeding 'v' if it exists on tag -REF=${REF/#v} -TOML_VERSION=$(toml get $MANIFEST package.version | tr -d '"') - -if [ "$TOML_VERSION" != "$REF" ]; then - err "Crate version $TOML_VERSION, doesn't match tag version $REF" - exit 1 -else - status "Crate version matches tag $TOML_VERSION" -fi diff --git a/forc-plugins/forc-debug/.gitignore b/forc-plugins/forc-debug/.gitignore deleted file mode 100644 index 5ef75055707..00000000000 --- a/forc-plugins/forc-debug/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/target -Cargo.lock - -# Autogenerated files -schema.graphql diff --git a/forc-plugins/forc-debug/Cargo.toml b/forc-plugins/forc-debug/Cargo.toml index 45e6f9ad722..28b68131927 100644 --- a/forc-plugins/forc-debug/Cargo.toml +++ b/forc-plugins/forc-debug/Cargo.toml @@ -1,7 +1,12 @@ [package] -name = "fuel-debugger" -version = "0.1.0" -edition = "2021" +name = "forc-debug" +version = "0.48.1" +description = "Supports debugging Sway code via CLI and DAP server." +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true [dependencies] clap = { version = "3.1", features = ["env", "derive"] } diff --git a/forc-plugins/forc-debug/README.md b/forc-plugins/forc-debug/README.md index 9ecb78d4aa8..bb991d18dc6 100755 --- a/forc-plugins/forc-debug/README.md +++ b/forc-plugins/forc-debug/README.md @@ -1,4 +1,4 @@ -# Fuel Debugger +# `forc-debug` [![build](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml/badge.svg)](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml) [![crates.io](https://img.shields.io/crates/v/fuel-debugger?label=latest)](https://crates.io/crates/fuel-debugger) diff --git a/forc-plugins/forc-debug/docs/walkthrough.md b/forc-plugins/forc-debug/docs/walkthrough.md index 88a0b1609c3..4451a22229a 100755 --- a/forc-plugins/forc-debug/docs/walkthrough.md +++ b/forc-plugins/forc-debug/docs/walkthrough.md @@ -73,7 +73,7 @@ We can recognize the `while` loop by the conditional jumps `JNZI`. The condition ## Setting up the debugging -We can start up the debug infrastructure. On a new terminal session run `fuel-core run --db-type in-memory --debug`; we need to have that running because it actually executes the program. Now we can fire up the debugger itself: `fuel-debugger`. Now +We can start up the debug infrastructure. On a new terminal session run `fuel-core run --db-type in-memory --debug`; we need to have that running because it actually executes the program. Now we can fire up the debugger itself: `forc-debug`. Now if everything is set up correctly, you shoould see the debugger prompt (`>> `). You can use `help` command to list available commands. Now we would like to inspect the program while it's running. To do this, we first need to send the script to the executor, i.e. `fuel-core`. To do so, we need a *transaction specification*, `tx.json`. It looks something like this: diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 952968b5165..77e6e8df0c5 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -19,7 +19,7 @@ fn test_cli() { .expect("Failed to start fuel-core"); let mut run_cmd = CargoBuild::new() - .bin("fuel-debugger") + .bin("forc-debug") .current_release() .current_target() .run() From 1608af4530df2fd96a575785d83991a857650210 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 14:49:54 -0800 Subject: [PATCH 10/19] Update imports --- forc-plugins/forc-debug/examples/client_usage.rs | 2 +- forc-plugins/forc-debug/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forc-plugins/forc-debug/examples/client_usage.rs b/forc-plugins/forc-debug/examples/client_usage.rs index 39ef4fdb6e4..90ed87e0184 100755 --- a/forc-plugins/forc-debug/examples/client_usage.rs +++ b/forc-plugins/forc-debug/examples/client_usage.rs @@ -1,4 +1,4 @@ -use fuel_debugger::{ContractId, FuelClient, Transaction}; +use forc_debug::{ContractId, FuelClient, Transaction}; #[tokio::main] async fn main() { diff --git a/forc-plugins/forc-debug/src/main.rs b/forc-plugins/forc-debug/src/main.rs index ac88485745e..57b9335242e 100644 --- a/forc-plugins/forc-debug/src/main.rs +++ b/forc-plugins/forc-debug/src/main.rs @@ -1,10 +1,10 @@ use clap::Parser; -use fuel_debugger::names::register_name; +use forc_debug::names::register_name; use shellfish::async_fn; use shellfish::{Command as ShCommand, Shell}; use std::error::Error; -use fuel_debugger::{names, ContractId, FuelClient, RunResult, Transaction}; +use forc_debug::{names, ContractId, FuelClient, RunResult, Transaction}; use fuel_vm::consts::{VM_MAX_RAM, VM_REGISTER_COUNT, WORD_SIZE}; #[derive(Parser, Debug)] From 5780003a7f81583bd9e57448dac42d8e90214334 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 14:52:48 -0800 Subject: [PATCH 11/19] Remove badges from README --- forc-plugins/forc-debug/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/forc-plugins/forc-debug/README.md b/forc-plugins/forc-debug/README.md index bb991d18dc6..7d2764ac6d9 100755 --- a/forc-plugins/forc-debug/README.md +++ b/forc-plugins/forc-debug/README.md @@ -1,10 +1,5 @@ # `forc-debug` -[![build](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml/badge.svg)](https://github.com/FuelLabs/fuel-debugger/actions/workflows/ci.yml) -[![crates.io](https://img.shields.io/crates/v/fuel-debugger?label=latest)](https://crates.io/crates/fuel-debugger) -[![docs](https://docs.rs/fuel-debugger/badge.svg)](https://docs.rs/fuel-debugger/) -[![discord](https://img.shields.io/badge/chat%20on-discord-orange?&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/xfpK4Pe) - Debugger attachable to FuelVM over a GraphQL API. ## Testing From 656907fb01116edc5eab9aeefc33fa6dc96164a5 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 15:13:04 -0800 Subject: [PATCH 12/19] Fix udeps and mdbook checks --- Cargo.lock | 1053 ++-------------------- docs/book/src/forc/plugins/forc_debug.md | 1 + forc-plugins/forc-debug/Cargo.toml | 1 - forc-plugins/forc-debug/README.md | 2 +- 4 files changed, 86 insertions(+), 971 deletions(-) create mode 100644 docs/book/src/forc/plugins/forc_debug.md diff --git a/Cargo.lock b/Cargo.lock index f8ffd6acc24..bcea0f55eae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,26 +27,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - [[package]] name = "aes" version = "0.8.3" @@ -54,44 +34,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if 1.0.0", - "cipher 0.4.4", + "cipher", "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes 0.6.0", - "cipher 0.2.5", - "ctr 0.6.0", - "ghash", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.8.6" @@ -275,150 +221,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" -dependencies = [ - "concurrent-queue", - "event-listener 4.0.0", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" -dependencies = [ - "async-lock 3.2.0", - "async-task", - "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.1.0", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.1.1", - "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", - "blocking", - "futures-lite 2.1.0", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if 1.0.0", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" -dependencies = [ - "async-lock 3.2.0", - "cfg-if 1.0.0", - "concurrent-queue", - "futures-io", - "futures-lite 2.1.0", - "parking", - "polling 3.3.1", - "rustix 0.38.26", - "slab", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" -dependencies = [ - "event-listener 4.0.0", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 1.13.0", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-task" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" - [[package]] name = "async-trait" version = "0.1.74" @@ -439,12 +241,6 @@ dependencies = [ "critical-section", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "atty" version = "0.2.14" @@ -483,7 +279,7 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes 1.5.0", + "bytes", "futures-util", "http", "http-body", @@ -512,7 +308,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" dependencies = [ "async-trait", - "bytes 1.5.0", + "bytes", "futures-util", "http", "http-body", @@ -703,22 +499,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" -dependencies = [ - "async-channel 2.1.1", - "async-lock 3.2.0", - "async-task", - "fastrand 2.0.1", - "futures-io", - "futures-lite 2.1.0", - "piper", - "tracing", -] - [[package]] name = "brotli" version = "3.4.0" @@ -779,12 +559,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.5.0" @@ -877,15 +651,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1053,7 +818,7 @@ dependencies = [ "hmac 0.12.1", "once_cell", "pbkdf2 0.12.2", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", ] @@ -1114,13 +879,13 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baee326bc603965b0f26583e1ecd7c111c41b49bd92a344897476a352798869" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-core", "futures-util", "http", "mime", "mime_guess", - "rand 0.8.5", + "rand", "thiserror", ] @@ -1145,15 +910,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "concurrent-queue" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.7" @@ -1172,12 +928,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1196,23 +946,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64 0.13.1", - "hkdf 0.10.0", - "hmac 0.10.1", - "percent-encoding", - "rand 0.8.5", - "sha2 0.9.9", - "time 0.2.27", - "version_check", -] - [[package]] name = "cookie" version = "0.16.2" @@ -1220,7 +953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.30", + "time", "version_check", ] @@ -1230,14 +963,14 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" dependencies = [ - "cookie 0.16.2", + "cookie", "idna 0.2.3", "log", "publicsuffix", "serde", "serde_derive", "serde_json", - "time 0.3.30", + "time", "url", ] @@ -1290,12 +1023,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1403,7 +1130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1428,16 +1155,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "csv" version = "1.3.0" @@ -1468,53 +1185,13 @@ dependencies = [ "sct 0.6.1", ] -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher 0.2.5", -] - [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", -] - -[[package]] -name = "curl" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.10", - "winapi", -] - -[[package]] -name = "curl-sys" -version = "0.4.70+curl-8.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" -dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "windows-sys 0.48.0", + "cipher", ] [[package]] @@ -1529,7 +1206,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version 0.4.0", + "rustc_version", "subtle", ] @@ -1733,7 +1410,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1848,12 +1525,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "dissimilar" version = "1.0.7" @@ -1944,7 +1615,7 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -2069,13 +1740,13 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes 0.8.3", - "ctr 0.9.2", + "aes", + "ctr", "digest 0.10.7", "hex", "hmac 0.12.1", "pbkdf2 0.11.0", - "rand 0.8.5", + "rand", "scrypt", "serde", "serde_json", @@ -2118,33 +1789,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.0", - "pin-project-lite", -] - [[package]] name = "eventsource-client" version = "0.10.2" @@ -2191,15 +1835,6 @@ dependencies = [ "regex", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -2223,7 +1858,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93f7a0db71c99f68398f80653ed05afb0b00e062e1a20c7ff849c4edfabbbcc" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.26", + "rustix", "windows-sys 0.52.0", ] @@ -2233,7 +1868,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2283,7 +1918,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -2304,17 +1939,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "flume" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bebadab126f8120d410b677ed95eee4ba6eb7c6dd8e34a5ec88a08050e26132" -dependencies = [ - "futures-core", - "futures-sink", - "spinning_top", -] - [[package]] name = "fnv" version = "1.0.7" @@ -2378,7 +2002,7 @@ dependencies = [ "fuels-core", "futures", "hex", - "rand 0.8.5", + "rand", "rpassword", "serde", "serde_json", @@ -2404,7 +2028,7 @@ dependencies = [ "futures", "hex", "libp2p-identity", - "rand 0.8.5", + "rand", "serde", "serde_json", "serde_yaml", @@ -2428,7 +2052,6 @@ dependencies = [ "rexpect", "serde_json", "shellfish", - "surf", "thiserror", "tokio", ] @@ -2504,7 +2127,7 @@ dependencies = [ "petgraph", "regex", "reqwest", - "semver 1.0.20", + "semver", "serde", "serde_ignored", "serde_json", @@ -2531,7 +2154,7 @@ dependencies = [ "fuel-abi-types 0.2.1", "fuel-tx", "fuel-vm", - "rand 0.8.5", + "rand", "rayon", "sway-core", "sway-types", @@ -2601,7 +2224,7 @@ dependencies = [ "futures", "hex", "home", - "rand 0.8.5", + "rand", "rpassword", "serde_json", "termion", @@ -2833,7 +2456,7 @@ dependencies = [ "k256", "lazy_static", "p256", - "rand 0.8.5", + "rand", "secp256k1 0.26.0", "serde", "sha2 0.10.8", @@ -2892,7 +2515,7 @@ dependencies = [ "num-bigint", "pest", "pest_derive", - "rand 0.8.5", + "rand", "sha3", "snafu", ] @@ -2959,7 +2582,7 @@ dependencies = [ "fuel-types", "hashbrown 0.14.3", "itertools 0.10.5", - "rand 0.8.5", + "rand", "serde", "serde_json", "strum", @@ -2974,7 +2597,7 @@ checksum = "ee3eda536ec1c1c7b0e06bf4a2d7b22980a79108c66ab8f81661433b2211e21e" dependencies = [ "fuel-derive", "hex", - "rand 0.8.5", + "rand", "serde", ] @@ -3002,7 +2625,7 @@ dependencies = [ "paste", "percent-encoding", "primitive-types", - "rand 0.8.5", + "rand", "serde", "sha3", "static_assertions", @@ -3042,8 +2665,8 @@ dependencies = [ "fuel-vm", "fuels-core", "hex", - "rand 0.8.5", - "semver 1.0.20", + "rand", + "semver", "tai64", "thiserror", "tokio", @@ -3105,7 +2728,7 @@ dependencies = [ "itertools 0.12.0", "proc-macro2", "quote", - "rand 0.8.5", + "rand", "syn 2.0.39", ] @@ -3116,7 +2739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d9fd3a7722685ba45a6794374f44530732f4f2f43f507eb1ec6fd0656abacf8" dependencies = [ "async-trait", - "bytes 1.5.0", + "bytes", "fuel-abi-types 0.3.0", "fuel-asm", "fuel-tx", @@ -3124,7 +2747,7 @@ dependencies = [ "fuels-accounts", "fuels-core", "itertools 0.12.0", - "rand 0.8.5", + "rand", "serde_json", "tokio", ] @@ -3146,7 +2769,7 @@ dependencies = [ "futures", "hex", "portpicker", - "rand 0.8.5", + "rand", "serde", "serde_json", "serde_with 3.4.0", @@ -3209,34 +2832,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" -dependencies = [ - "fastrand 2.0.1", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - [[package]] name = "futures-macro" version = "0.3.29" @@ -3330,16 +2925,6 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" version = "0.28.1" @@ -3412,18 +2997,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "graph-cycles" version = "0.1.0" @@ -3452,7 +3025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3462,7 +3035,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -3544,7 +3117,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32", - "rustc_version 0.4.0", + "rustc_version", "serde", "spin 0.9.8", "stable_deref_trait", @@ -3589,16 +3162,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" -dependencies = [ - "digest 0.9.0", - "hmac 0.10.1", -] - [[package]] name = "hkdf" version = "0.12.3" @@ -3614,17 +3177,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.0", + "crypto-mac", "digest 0.9.0", ] @@ -3669,7 +3222,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", "itoa", ] @@ -3680,53 +3233,17 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.5.0", + "bytes", "http", "pin-project-lite", ] -[[package]] -name = "http-client" -version = "6.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5" -dependencies = [ - "async-std", - "async-trait", - "cfg-if 1.0.0", - "http-types", - "isahc", - "log", -] - [[package]] name = "http-range-header" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" -[[package]] -name = "http-types" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" -dependencies = [ - "anyhow", - "async-channel 1.9.0", - "async-std", - "base64 0.13.1", - "cookie 0.14.4", - "futures-lite 1.13.0", - "infer", - "pin-project-lite", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", -] - [[package]] name = "httparse" version = "1.8.0" @@ -3751,7 +3268,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -3775,7 +3292,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0eb2cf73e96e9925f4bed948e763aa2901c2f1a3a5f713ee41917433ced6671" dependencies = [ - "bytes 1.5.0", + "bytes", "common-multipart-rfc7578", "futures-core", "http", @@ -3834,7 +3351,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", + "bytes", "hyper", "native-tls", "tokio", @@ -3908,7 +3425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core 0.6.4", + "rand_core", "rand_xoshiro", "sized-chunks", "typenum", @@ -3994,12 +3511,6 @@ dependencies = [ "serde", ] -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - [[package]] name = "inotify" version = "0.9.6" @@ -4053,17 +3564,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.3", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipfs-api-backend-hyper" version = "0.6.0" @@ -4072,7 +3572,7 @@ checksum = "8a9d131b408b4caafe1e7c00d410a09ad3eb7e3ab68690cf668e86904b2176b4" dependencies = [ "async-trait", "base64 0.13.1", - "bytes 1.5.0", + "bytes", "futures", "http", "hyper", @@ -4088,7 +3588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b74065805db266ba2c6edbd670b23c4714824a955628472b2e46cc9f3a869cb" dependencies = [ "async-trait", - "bytes 1.5.0", + "bytes", "cfg-if 1.0.0", "common-multipart-rfc7578", "dirs 4.0.0", @@ -4120,33 +3620,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.26", + "rustix", "windows-sys 0.48.0", ] -[[package]] -name = "isahc" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2948a0ce43e2c2ef11d7edf6816508998d99e13badd1150be0914205df9388a" -dependencies = [ - "bytes 0.5.6", - "crossbeam-utils", - "curl", - "curl-sys", - "flume", - "futures-lite 1.13.0", - "http", - "log", - "once_cell", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url", - "waker-fn", -] - [[package]] name = "itertools" version = "0.10.5" @@ -4232,15 +3709,6 @@ dependencies = [ "libc", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -4276,16 +3744,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libnghttp2-sys" -version = "0.1.8+1.55.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fae956c192dadcdb5dace96db71fa0b827333cce7c7b38dc71446f024d8a340" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "libp2p-identity" version = "0.2.8" @@ -4294,7 +3752,7 @@ checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ "asn1_der", "bs58", - "hkdf 0.12.3", + "hkdf", "libsecp256k1", "multihash 0.19.1", "quick-protobuf", @@ -4339,7 +3797,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -4415,12 +3873,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -4442,9 +3894,6 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] [[package]] name = "logos" @@ -4537,7 +3986,7 @@ dependencies = [ "anyhow", "clap 3.2.25", "mdbook", - "semver 1.0.20", + "semver", "serde", "serde_json", ] @@ -5196,12 +4645,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - [[package]] name = "parking_lot" version = "0.11.2" @@ -5389,7 +4832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -5447,17 +4890,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" -dependencies = [ - "atomic-waker", - "fastrand 2.0.1", - "futures-io", -] - [[package]] name = "pkcs8" version = "0.10.2" @@ -5491,7 +4923,7 @@ dependencies = [ "line-wrap", "quick-xml", "serde", - "time 0.3.30", + "time", ] [[package]] @@ -5522,54 +4954,13 @@ dependencies = [ "plotters-backend", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if 1.0.0", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" -dependencies = [ - "cfg-if 1.0.0", - "concurrent-queue", - "pin-project-lite", - "rustix 0.38.26", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portpicker" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -5853,19 +5244,6 @@ dependencies = [ "nibble_vec", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -5873,18 +5251,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -5894,16 +5262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -5915,22 +5274,13 @@ dependencies = [ "getrandom 0.2.11", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xoshiro" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -6062,8 +5412,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "base64 0.21.5", - "bytes 1.5.0", - "cookie 0.16.2", + "bytes", + "cookie", "cookie_store", "encoding_rs", "futures-core", @@ -6108,7 +5458,7 @@ checksum = "73d84c8f9836efb0f5f5f8de4700a953c4e1f3119e5cfcb0aad8e5be73daf991" dependencies = [ "arrayref", "auto_impl", - "bytes 1.5.0", + "bytes", "hashbrown 0.13.2", "num_enum", "primitive-types", @@ -6123,7 +5473,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0353d456ef3e989dc9190f42c6020f09bc2025930c37895826029304413204b5" dependencies = [ - "bytes 1.5.0", + "bytes", "hashbrown 0.13.2", "num", "once_cell", @@ -6201,7 +5551,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes 1.5.0", + "bytes", "rustc-hex", ] @@ -6290,36 +5640,13 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", -] - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "semver", ] [[package]] @@ -6331,7 +5658,7 @@ dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -6451,7 +5778,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -6565,7 +5892,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" dependencies = [ - "rand 0.8.5", + "rand", "secp256k1-sys 0.8.1", ] @@ -6619,15 +5946,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.20" @@ -6637,12 +5955,6 @@ dependencies = [ "serde", ] -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.193" @@ -6683,17 +5995,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_qs" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" -dependencies = [ - "percent-encoding", - "serde", - "thiserror", -] - [[package]] name = "serde_repr" version = "0.1.17" @@ -6750,7 +6051,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros 3.4.0", - "time 0.3.30", + "time", ] [[package]] @@ -6790,21 +6091,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.9.9" @@ -6889,7 +6175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -6933,17 +6219,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "sluice" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" -dependencies = [ - "async-channel 1.9.0", - "futures-core", - "futures-io", -] - [[package]] name = "smallvec" version = "1.11.2" @@ -7014,15 +6289,6 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spinning_top" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9eb1a2f4c41445a3a0ff9abc5221c5fcd28e1f13cd7c0397706f9ac938ddb0" -dependencies = [ - "lock_api", -] - [[package]] name = "spki" version = "0.7.3" @@ -7039,70 +6305,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "str-buf" version = "1.0.6" @@ -7194,7 +6402,7 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand 0.8.5", + "rand", "rustc-hex", ] @@ -7204,29 +6412,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "surf" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718b1ae6b50351982dedff021db0def601677f2120938b070eadb10ba4038dd7" -dependencies = [ - "async-std", - "async-trait", - "cfg-if 1.0.0", - "encoding_rs", - "futures-util", - "getrandom 0.2.11", - "http-client", - "http-types", - "log", - "mime_guess", - "once_cell", - "pin-project-lite", - "serde", - "serde_json", - "web-sys", -] - [[package]] name = "sway-ast" version = "0.48.1" @@ -7581,7 +6766,7 @@ dependencies = [ "logos", "regex", "rowan", - "semver 1.0.20", + "semver", "smallvec", "toml 0.5.11", "wasm-bindgen", @@ -7605,9 +6790,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.26", + "rustix", "windows-sys 0.48.0", ] @@ -7659,7 +6844,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.26", + "rustix", "windows-sys 0.48.0", ] @@ -7681,7 +6866,7 @@ version = "0.0.0" dependencies = [ "anyhow", "assert_matches", - "bytes 1.5.0", + "bytes", "clap 4.4.11", "colored", "filecheck", @@ -7696,7 +6881,7 @@ dependencies = [ "hex", "miden", "prettydiff 0.6.4", - "rand 0.8.5", + "rand", "regex", "revm", "serde_json", @@ -7795,21 +6980,6 @@ dependencies = [ "tikv-jemalloc-sys", ] -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - [[package]] name = "time" version = "0.3.30" @@ -7821,7 +6991,7 @@ dependencies = [ "powerfmt", "serde", "time-core", - "time-macros 0.2.15", + "time-macros", ] [[package]] @@ -7830,16 +7000,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - [[package]] name = "time-macros" version = "0.2.15" @@ -7849,19 +7009,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tiny-bip39" version = "1.0.0" @@ -7872,7 +7019,7 @@ dependencies = [ "hmac 0.12.1", "once_cell", "pbkdf2 0.11.0", - "rand 0.8.5", + "rand", "rustc-hash", "sha2 0.10.8", "thiserror", @@ -7922,7 +7069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes", "libc", "mio", "num_cpus", @@ -8003,7 +7150,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", @@ -8094,7 +7241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "bitflags 1.3.2", - "bytes 1.5.0", + "bytes", "futures-core", "futures-util", "http", @@ -8120,7 +7267,7 @@ checksum = "9b38fb0e6ce037835174256518aace3ca621c4f96383c56bb846cfc11b341910" dependencies = [ "async-trait", "auto_impl", - "bytes 1.5.0", + "bytes", "dashmap", "futures", "httparse", @@ -8185,16 +7332,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -8344,16 +7481,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "unreachable" version = "1.0.0" @@ -8439,12 +7566,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" - [[package]] name = "vcpkg" version = "0.2.15" @@ -8475,12 +7596,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "2.4.0" @@ -8615,7 +7730,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.26", + "rustix", "windows-sys 0.48.0", ] diff --git a/docs/book/src/forc/plugins/forc_debug.md b/docs/book/src/forc/plugins/forc_debug.md new file mode 100644 index 00000000000..4d2a40becc0 --- /dev/null +++ b/docs/book/src/forc/plugins/forc_debug.md @@ -0,0 +1 @@ +# forc debug diff --git a/forc-plugins/forc-debug/Cargo.toml b/forc-plugins/forc-debug/Cargo.toml index 28b68131927..ace71f2502a 100644 --- a/forc-plugins/forc-debug/Cargo.toml +++ b/forc-plugins/forc-debug/Cargo.toml @@ -15,7 +15,6 @@ fuel-types = { version = "0.43", features = ["serde"] } fuel-vm = { version = "0.43", features = ["serde"] } serde_json = "1.0" shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] } -surf = "2.3" thiserror = "1.0" tokio = { version = "1.19", features = ["net", "io-util", "macros", "rt-multi-thread"] } diff --git a/forc-plugins/forc-debug/README.md b/forc-plugins/forc-debug/README.md index 7d2764ac6d9..186d2b0fcb8 100755 --- a/forc-plugins/forc-debug/README.md +++ b/forc-plugins/forc-debug/README.md @@ -1,4 +1,4 @@ -# `forc-debug` +# forc-debug Debugger attachable to FuelVM over a GraphQL API. From 9026ab81d66f5377c2c4723ad19020d9d8aebabe Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 15:28:58 -0800 Subject: [PATCH 13/19] More mdbook fixes --- docs/book/src/SUMMARY.md | 1 + forc-plugins/forc-crypto/Cargo.toml | 1 - forc-plugins/forc-debug/LICENSE | 100 ---------------------------- 3 files changed, 1 insertion(+), 101 deletions(-) delete mode 100755 forc-plugins/forc-debug/LICENSE diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 195908d9d8e..c72c9c3561a 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -89,6 +89,7 @@ - [forc run](./forc/plugins/forc_client/forc_run.md) - [forc submit](./forc/plugins/forc_client/forc_submit.md) - [forc crypto](./forc/plugins/forc_crypto.md) + - [forc debug](./forc/plugins/forc_debug.md) - [forc doc](./forc/plugins/forc_doc.md) - [forc explore](./forc/plugins/forc_explore.md) - [forc fmt](./forc/plugins/forc_fmt.md) diff --git a/forc-plugins/forc-crypto/Cargo.toml b/forc-plugins/forc-crypto/Cargo.toml index 59833f62416..7807b13956b 100644 --- a/forc-plugins/forc-crypto/Cargo.toml +++ b/forc-plugins/forc-crypto/Cargo.toml @@ -8,7 +8,6 @@ homepage.workspace = true license.workspace = true repository.workspace = true - [dependencies] anyhow = "1.0.75" async-trait = "0.1.58" diff --git a/forc-plugins/forc-debug/LICENSE b/forc-plugins/forc-debug/LICENSE deleted file mode 100755 index 3f8049c9d9d..00000000000 --- a/forc-plugins/forc-debug/LICENSE +++ /dev/null @@ -1,100 +0,0 @@ -Business Source License 1.1 - -License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. -"Business Source License" is a trademark of MariaDB Corporation Ab. - ------------------------------------------------------------------------------ - -Parameters - -Licensor: Fuel Labs - -Licensed Work: fuel-core - The Licensed Work is (c) 2022 Fuel Labs - -Additional Use Grant: Any uses listed and defined at - - -Change Date: The earlier of 2024-01-01 or a date specified at - - -Change License: Apache-2.0 - ------------------------------------------------------------------------------ - -Terms - -The Licensor hereby grants you the right to copy, modify, create derivative -works, redistribute, and make non-production use of the Licensed Work. The -Licensor may make an Additional Use Grant, above, permitting limited -production use. - -Effective on the Change Date, or the fourth anniversary of the first publicly -available distribution of a specific version of the Licensed Work under this -License, whichever comes first, the Licensor hereby grants you rights under -the terms of the Change License, and the rights granted in the paragraph -above terminate. - -If your use of the Licensed Work does not comply with the requirements -currently in effect as described in this License, you must purchase a -commercial license from the Licensor, its affiliated entities, or authorized -resellers, or you must refrain from using the Licensed Work. - -All copies of the original and modified Licensed Work, and derivative works -of the Licensed Work, are subject to this License. This License applies -separately for each version of the Licensed Work and the Change Date may vary -for each version of the Licensed Work released by Licensor. - -You must conspicuously display this License on each original or modified copy -of the Licensed Work. If you receive the Licensed Work in original or -modified form from a third party, the terms and conditions set forth in this -License apply to your use of that work. - -Any use of the Licensed Work in violation of this License will automatically -terminate your rights under this License for the current and all other -versions of the Licensed Work. - -This License does not grant you any right in any trademark or logo of -Licensor or its affiliates (provided that you may use a trademark or logo of -Licensor as expressly required by this License). - -TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -TITLE. - -MariaDB hereby grants you permission to use this License’s text to license -your works, and to refer to it using the trademark "Business Source License", -as long as you comply with the Covenants of Licensor below. - ------------------------------------------------------------------------------ - -Covenants of Licensor - -In consideration of the right to use this License’s text and the "Business -Source License" name and trademark, Licensor covenants to MariaDB, and to all -other recipients of the licensed work to be provided by Licensor: - -1. To specify as the Change License the GPL Version 2.0 or any later version, - or a license that is compatible with GPL Version 2.0 or a later version, - where "compatible" means that software provided under the Change License can - be included in a program with software provided under GPL Version 2.0 or a - later version. Licensor may specify additional Change Licenses without - limitation. - -2. To either: (a) specify an additional grant of rights to use that does not - impose any additional restriction on the right granted in this License, as - the Additional Use Grant; or (b) insert the text "None". - -3. To specify a Change Date. - -4. Not to modify this License in any other way. - ------------------------------------------------------------------------------ - -Notice - -The Business Source License (this document, or the "License") is not an Open -Source license. However, the Licensed Work will eventually be made available -under an Open Source License, as stated in this License. From a85f42a4a8a8c0b24fa21c0f71130eb787c6ab6e Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 15:30:48 -0800 Subject: [PATCH 14/19] Run fuel-core in CI --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 368406bdc2b..9043d6c9391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -396,6 +396,11 @@ jobs: cargo-test-workspace: runs-on: ubuntu-latest + services: + fuel-core: + image: ghcr.io/fuellabs/fuel-core:v0.21.0 + ports: + - 4000:4000 steps: - uses: actions/checkout@v3 - name: Install toolchain From d5511e446169450c5a8d4676c8cb560cc8854627 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 16:44:20 -0800 Subject: [PATCH 15/19] connect to running fuel-core --- forc-plugins/forc-debug/README.md | 2 +- .../forc-debug/tests/cli_integration.rs | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/forc-plugins/forc-debug/README.md b/forc-plugins/forc-debug/README.md index 186d2b0fcb8..3ae47c34313 100755 --- a/forc-plugins/forc-debug/README.md +++ b/forc-plugins/forc-debug/README.md @@ -4,4 +4,4 @@ Debugger attachable to FuelVM over a GraphQL API. ## Testing -The automated tests assume that `fuel-core` binary is installed. +The automated tests assume that `fuel-core` binary is running on port 4000. diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 77e6e8df0c5..173f5d48075 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -6,18 +6,6 @@ use std::process::Command; #[test] fn test_cli() { - let port = portpicker::pick_unused_port().expect("No ports free"); - - let mut fuel_core = Command::new("fuel-core") - .arg("run") - .arg("--debug") - .arg("--db-type") - .arg("in-memory") - .arg("--port") - .arg(port.to_string()) - .spawn() - .expect("Failed to start fuel-core"); - let mut run_cmd = CargoBuild::new() .bin("forc-debug") .current_release() @@ -28,7 +16,7 @@ fn test_cli() { dbg!(&run_cmd); - run_cmd.arg(format!("http://127.0.0.1:{}/graphql", port)); + run_cmd.arg(format!("http://127.0.0.1:{}/graphql", 4000)); let mut cmd = spawn_command(run_cmd, Some(2000)).unwrap(); @@ -55,6 +43,4 @@ fn test_cli() { cmd.send_line("start_tx examples/example_tx.json").unwrap(); cmd.exp_regex(r"Receipt: Return").unwrap(); cmd.send_line(r"exit").unwrap(); - - fuel_core.kill().expect("Couldn't kill fuel-core"); -} + } From 6c77ad96285e259241acc20a889192c422928325 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 16:47:57 -0800 Subject: [PATCH 16/19] fmt --- forc-plugins/forc-debug/tests/cli_integration.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 173f5d48075..862fd7761a5 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -2,7 +2,6 @@ use escargot::CargoBuild; use rexpect::session::spawn_command; -use std::process::Command; #[test] fn test_cli() { @@ -43,4 +42,4 @@ fn test_cli() { cmd.send_line("start_tx examples/example_tx.json").unwrap(); cmd.exp_regex(r"Receipt: Return").unwrap(); cmd.send_line(r"exit").unwrap(); - } +} From 99d8ffb08afea3472cfc71bec71a1537296dc896 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 18:16:54 -0800 Subject: [PATCH 17/19] Install fuel-core in CI --- .github/workflows/ci.yml | 11 +++++----- forc-plugins/forc-debug/README.md | 2 +- .../forc-debug/tests/cli_integration.rs | 21 ++++++++++++++++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9043d6c9391..cc4ce306d4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -396,11 +396,6 @@ jobs: cargo-test-workspace: runs-on: ubuntu-latest - services: - fuel-core: - image: ghcr.io/fuellabs/fuel-core:v0.21.0 - ports: - - 4000:4000 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -410,7 +405,11 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Run tests run: cargo test --locked --release - + - name: Install fuel-core for tests + uses: baptiste0928/cargo-install@v2 + with: + crate: fuel-core-bin + version: "0.21" cargo-unused-deps-check: runs-on: ubuntu-latest steps: diff --git a/forc-plugins/forc-debug/README.md b/forc-plugins/forc-debug/README.md index 3ae47c34313..186d2b0fcb8 100755 --- a/forc-plugins/forc-debug/README.md +++ b/forc-plugins/forc-debug/README.md @@ -4,4 +4,4 @@ Debugger attachable to FuelVM over a GraphQL API. ## Testing -The automated tests assume that `fuel-core` binary is running on port 4000. +The automated tests assume that `fuel-core` binary is installed. diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 862fd7761a5..8ed74e3f9cd 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -2,11 +2,24 @@ use escargot::CargoBuild; use rexpect::session::spawn_command; +use std::process::Command; #[test] fn test_cli() { + let port = portpicker::pick_unused_port().expect("No ports free"); + + let mut fuel_core = Command::new("fuel-core") + .arg("run") + .arg("--debug") + .arg("--db-type") + .arg("in-memory") + .arg("--port") + .arg(port.to_string()) + .spawn() + .expect("Failed to start fuel-core"); + let mut run_cmd = CargoBuild::new() - .bin("forc-debug") + .bin("fuel-debugger") .current_release() .current_target() .run() @@ -15,7 +28,7 @@ fn test_cli() { dbg!(&run_cmd); - run_cmd.arg(format!("http://127.0.0.1:{}/graphql", 4000)); + run_cmd.arg(format!("http://127.0.0.1:{}/graphql", port)); let mut cmd = spawn_command(run_cmd, Some(2000)).unwrap(); @@ -42,4 +55,6 @@ fn test_cli() { cmd.send_line("start_tx examples/example_tx.json").unwrap(); cmd.exp_regex(r"Receipt: Return").unwrap(); cmd.send_line(r"exit").unwrap(); -} + + fuel_core.kill().expect("Couldn't kill fuel-core"); +} \ No newline at end of file From 1f0a80696604353e155314b81ae9f573fc2b44b3 Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 19:04:19 -0800 Subject: [PATCH 18/19] switch order --- .github/workflows/ci.yml | 6 +++--- forc-plugins/forc-debug/tests/cli_integration.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc4ce306d4d..80cec72439d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -402,14 +402,14 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} - - uses: Swatinem/rust-cache@v2 - - name: Run tests - run: cargo test --locked --release - name: Install fuel-core for tests uses: baptiste0928/cargo-install@v2 with: crate: fuel-core-bin version: "0.21" + - uses: Swatinem/rust-cache@v2 + - name: Run tests + run: cargo test --locked --release cargo-unused-deps-check: runs-on: ubuntu-latest steps: diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 8ed74e3f9cd..952968b5165 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -57,4 +57,4 @@ fn test_cli() { cmd.send_line(r"exit").unwrap(); fuel_core.kill().expect("Couldn't kill fuel-core"); -} \ No newline at end of file +} From 0e2936603cf53cfd7a1b47a8d1515ce73dc1cf7c Mon Sep 17 00:00:00 2001 From: Sophie Date: Wed, 13 Dec 2023 19:23:04 -0800 Subject: [PATCH 19/19] update bin name --- forc-plugins/forc-debug/tests/cli_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forc-plugins/forc-debug/tests/cli_integration.rs b/forc-plugins/forc-debug/tests/cli_integration.rs index 952968b5165..77e6e8df0c5 100755 --- a/forc-plugins/forc-debug/tests/cli_integration.rs +++ b/forc-plugins/forc-debug/tests/cli_integration.rs @@ -19,7 +19,7 @@ fn test_cli() { .expect("Failed to start fuel-core"); let mut run_cmd = CargoBuild::new() - .bin("fuel-debugger") + .bin("forc-debug") .current_release() .current_target() .run()