From ed895e733b5a49b65af84a1b895713d6341f45aa Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 1 Apr 2024 14:55:59 -0600 Subject: [PATCH] Squashed commit of the following: commit 8a42b48e6160114fad26b6899e40cb823ad50138 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 1 14:43:52 2024 -0600 build(deps): bump mio from 0.8.10 to 0.8.11 in /docs (#927) Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/tokio-rs/mio/releases) - [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: mio dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Waylon Jepsen <57912727+0xJepsen@users.noreply.github.com> Co-authored-by: Colin Roberts commit 70ca56453eb98a33b614a469f954701be7f3f254 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 1 14:43:23 2024 -0600 build(deps): bump anyhow from 1.0.80 to 1.0.81 (#933) Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.80 to 1.0.81. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.80...1.0.81) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Roberts commit fe1dee1d36d886fc331954e458180601ac06f429 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 1 14:41:31 2024 -0600 build(deps): bump proc-macro2 from 1.0.78 to 1.0.79 (#934) Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.78 to 1.0.79. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.78...1.0.79) --- updated-dependencies: - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Roberts commit a3eb86c419bc0ec7dcd95900dc0057395393304a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 1 14:40:57 2024 -0600 build(deps): bump toml from 0.8.10 to 0.8.12 (#935) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.10 to 0.8.12. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.12) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Roberts commit edd120dbd9c96576fe9562cb0dc8d28e242eb29d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 1 14:40:25 2024 -0600 build(deps): bump rayon from 1.8.1 to 1.10.0 (#937) Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.10.0. - [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.1...rayon-core-v1.10.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 227525e59d329714b8025d336d2357ca902785d5 Author: Waylon Jepsen <57912727+0xJepsen@users.noreply.github.com> Date: Mon Apr 1 14:39:59 2024 -0600 chore: update submodule (#928) Co-authored-by: Colin Roberts commit e5ddb2930a2cd2c45abbd8619a58da8043931ff0 Author: ali Date: Thu Mar 21 20:15:08 2024 +0300 Update README.md (#936) Fixed the cargo binary install package name commit 8d31dc8bda8e35dc4d9ec3e5bc4b4f182b274828 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Mar 6 13:42:23 2024 -0700 build(deps): bump ethers from 2.0.13 to 2.0.14 (#931) Bumps [ethers](https://github.com/gakonst/ethers-rs) from 2.0.13 to 2.0.14. - [Release notes](https://github.com/gakonst/ethers-rs/releases) - [Changelog](https://github.com/gakonst/ethers-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/gakonst/ethers-rs/commits) --- updated-dependencies: - dependency-name: ethers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 87778e4623eb13a5b1fa2880a9210fee4bc4dd37 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Mar 6 13:41:30 2024 -0700 build(deps): bump clap from 4.5.1 to 4.5.2 (#929) Bumps [clap](https://github.com/clap-rs/clap) from 4.5.1 to 4.5.2. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.1...v4.5.2) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f682745f7a49d5e7754881480138ea7bde06430d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Mar 6 13:40:51 2024 -0700 build(deps): bump chrono from 0.4.34 to 0.4.35 (#930) Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.34 to 0.4.35. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.34...v0.4.35) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 5a2263eb79e99f6d5cccdd8ee3884103f8cb1708 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Mar 4 16:57:30 2024 -0700 build(deps): bump mio from 0.8.10 to 0.8.11 (#926) Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/tokio-rs/mio/releases) - [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: mio dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 16bf32ee580d5cc082be6c203694d70051cf992e Author: Colin Roberts Date: Wed Feb 28 19:57:55 2024 -0700 feat: environment logs (#911) * feat: logs * feat: filter on logs * refactor: `ArbiterDB` and `Environment` commit dbca2d41adf78ff19810b8a19a3a5f94ebe0471e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Feb 28 14:05:43 2024 -0700 build(deps): bump crossbeam-channel from 0.5.11 to 0.5.12 (#919) Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.11 to 0.5.12. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.11...crossbeam-channel-0.5.12) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 63f167b0152e535cee5647e681c52ca11580562f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Feb 28 14:05:33 2024 -0700 build(deps): bump syn from 2.0.51 to 2.0.52 (#920) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.51 to 2.0.52. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.51...2.0.52) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit de894a38388d6301328ecac21d24bf2c8656d396 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Feb 28 14:05:20 2024 -0700 build(deps): bump tempfile from 3.10.0 to 3.10.1 (#917) Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.0 to 3.10.1. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.0...v3.10.1) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 50bfbd31ff4a437f0e29c3f8cec41fb5b4667763 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Feb 26 13:38:48 2024 -0700 build(deps): bump syn from 2.0.50 to 2.0.51 (#915) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.50 to 2.0.51. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.50...2.0.51) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 1db6bece8476aec5e650da32b17295dd8d4e9813 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon Feb 26 10:47:13 2024 -0700 chore: release (#914) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 8211c6ea175e43f9ca22f283607db21cee5b600b Author: Colin Roberts Date: Mon Feb 26 10:42:46 2024 -0700 feat: `error!` output from behavior (#913) * feat: `error!` output from behavior * submodule: update `template` * fix: `minter` example * fix: clippy --- CHANGELOG.md | 5 +++++ Cargo.toml | 20 ++++++++++---------- README.md | 2 +- bindings/lib/forge-std | 2 +- core/Cargo.toml | 2 +- docs/Cargo.lock | 4 ++-- engine/CHANGELOG.md | 5 +++++ engine/Cargo.toml | 2 +- engine/src/machine.rs | 26 ++++++++++++++++++++++---- examples/template | 2 +- 10 files changed, 49 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c683d303..f033c731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.19](https://github.com/primitivefinance/arbiter/compare/arbiter-v0.4.18...arbiter-v0.4.19) - 2024-02-26 + +### Added +- `error!` output from behavior ([#913](https://github.com/primitivefinance/arbiter/pull/913)) + ## [0.4.18](https://github.com/primitivefinance/arbiter/compare/arbiter-v0.4.17...arbiter-v0.4.18) - 2024-02-20 ### Other diff --git a/Cargo.toml b/Cargo.toml index 12580a5f..93a75197 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ exclude = ["benches", "docs"] # Package configuration [package] name = "arbiter" -version = "0.4.18" +version = "0.4.19" edition = "2021" authors = [ "Waylon Jepsen ", @@ -47,32 +47,32 @@ arbiter-macros = "0.1.1" revm = { version = "5.0.0", features = ["ethersdb", "std", "serde"] } revm-primitives = "=2.0.0" -ethers = { version = "2.0.13" } +ethers = { version = "2.0.14" } serde = { version = "1.0.197", features = ["derive"] } serde_json = { version = "1.0.114" } -toml = "0.8.10" +toml = "0.8.12" tokio = { version = "1.36.0", features = ["macros", "full"] } futures = "0.3.30" futures-util = { version = "0.3.30" } async-stream = "0.3.5" async-trait = { version = "0.1.77" } -crossbeam-channel = { version = "0.5.11" } +crossbeam-channel = { version = "0.5.12" } -syn = { version = "2.0.50", features = ["full"] } -proc-macro2 = { version = "1.0.78" } +syn = { version = "2.0.52", features = ["full"] } +proc-macro2 = { version = "1.0.79" } tracing = "0.1.40" thiserror = { version = "1.0.57" } -anyhow = "1.0.80" +anyhow = "1.0.81" # Dependencies for the release build of Arbiter bin [dependencies] arbiter-core.workspace = true # Command line and config -clap = { version = "4.5.1", features = ["derive"] } +clap = { version = "4.5.2", features = ["derive"] } serde.workspace = true serde_json.workspace = true config = { version = "=0.14.0" } @@ -85,7 +85,7 @@ Inflector = { version = "=0.11.4" } # Building files foundry-config = { version = "=0.2.0" } -tempfile = { version = "3.10.0" } +tempfile = { version = "3.10.1" } # Errors thiserror.workspace = true @@ -98,7 +98,7 @@ revm-primitives.workspace = true serde.workspace = true async-trait.workspace = true anyhow.workspace = true -rayon = { version = "1.8.0" } +rayon = { version = "1.10.0" } # Necessary for examples tokio.workspace = true diff --git a/README.md b/README.md index 1f395702..aeb146b5 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ You'll be prompted to provide a project name, and the rest will be set up for yo ### Binary To install the Arbiter binary, run: ```bash -cargo install Arbiter +cargo install arbiter ``` This will install the Arbiter binary on your machine. You can then run `arbiter --help` to see that Arbiter was correctly installed and see the help menu. diff --git a/bindings/lib/forge-std b/bindings/lib/forge-std index 3725a22a..2f6762e4 160000 --- a/bindings/lib/forge-std +++ b/bindings/lib/forge-std @@ -1 +1 @@ -Subproject commit 3725a22ae52065de9966beaf32de69aee46fb530 +Subproject commit 2f6762e4f73f3d835457c220b5f62dfeeb6f6341 diff --git a/core/Cargo.toml b/core/Cargo.toml index 1bedef9e..ad696ac7 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -59,7 +59,7 @@ futures.workspace = true # For bench cargo_metadata = "0.18.1" -chrono = "0.4.34" +chrono = "0.4.35" assert_matches = { version = "=1.5" } diff --git a/docs/Cargo.lock b/docs/Cargo.lock index fc5efb4b..69a179bb 100644 --- a/docs/Cargo.lock +++ b/docs/Cargo.lock @@ -2462,9 +2462,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", diff --git a/engine/CHANGELOG.md b/engine/CHANGELOG.md index cb552f5a..f5d82788 100644 --- a/engine/CHANGELOG.md +++ b/engine/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.3.2](https://github.com/primitivefinance/arbiter/compare/arbiter-engine-v0.3.1...arbiter-engine-v0.3.2) - 2024-02-26 + +### Added +- `error!` output from behavior ([#913](https://github.com/primitivefinance/arbiter/pull/913)) + ## [0.3.1](https://github.com/primitivefinance/arbiter/compare/arbiter-engine-v0.3.0...arbiter-engine-v0.3.1) - 2024-02-20 ### Other diff --git a/engine/Cargo.toml b/engine/Cargo.toml index ce766755..69996c26 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "arbiter-engine" -version = "0.3.1" +version = "0.3.2" edition = "2021" authors = [ "Waylon Jepsen ", diff --git a/engine/src/machine.rs b/engine/src/machine.rs index 38084dca..d6e3d888 100644 --- a/engine/src/machine.rs +++ b/engine/src/machine.rs @@ -7,6 +7,7 @@ use anyhow::Result; use arbiter_core::middleware::ArbiterMiddleware; use futures_util::{Stream, StreamExt}; use tokio::task::JoinHandle; +use tracing::error; use super::*; @@ -216,15 +217,27 @@ where async fn execute(&mut self, instruction: MachineInstruction) -> Result<()> { // NOTE: The unwraps here are safe because the `Behavior` in an engine is only // accessed here and it is private. + let id: Option; match instruction { MachineInstruction::Start(client, messager) => { + id = messager.id.clone(); + let id_clone = id.clone(); self.state = State::Starting; let mut behavior = self.behavior.take().unwrap(); let behavior_task: JoinHandle>, B)>> = tokio::spawn(async move { - let id = messager.id.clone(); - let stream = behavior.startup(client, messager).await?; - debug!("startup complete for behavior {:?}", id); + let stream = match behavior.startup(client, messager).await { + Ok(stream) => stream, + Err(e) => { + error!( + "startup failed for behavior {:?}: \n reason: {:?}", + id_clone, e + ); + // Throw a panic as we cannot recover from this for now. + panic!(); + } + }; + debug!("startup complete for behavior {:?}", id_clone); Ok((stream, behavior)) }); let (stream, behavior) = behavior_task.await??; @@ -232,7 +245,12 @@ where Some(stream) => { self.event_stream = Some(stream); self.behavior = Some(behavior); - self.execute(MachineInstruction::Process).await?; + match self.execute(MachineInstruction::Process).await { + Ok(_) => {} + Err(e) => { + error!("process failed for behavior {:?}: \n reason: {:?}", id, e); + } + } Ok(()) } None => { diff --git a/examples/template b/examples/template index 6211811e..a7ff8b9d 160000 --- a/examples/template +++ b/examples/template @@ -1 +1 @@ -Subproject commit 6211811ee2748d803fa27a755d51f5298a80f9e4 +Subproject commit a7ff8b9d6f03c3899caf2d31dd4fd650a7bbfa12