Skip to content

Commit

Permalink
feat: rebrand, workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ts0yu committed Oct 20, 2024
1 parent 64f5c52 commit 56a4b7a
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 178 deletions.
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Thank you for investing your time in contributing to our project! Any contribution you make is greatly appreciated :sparkles:.

Read our [Code of Conduct]([./CODE_OF_CONDUCT.md](https://github.com/primitivefinance/.github/blob/main/CODE_OF_CONDUCT.md)) to keep our community approachable and respectable.
Read our [Code of Conduct]([./CODE_OF_CONDUCT.md](https://github.com/anthias-labs/.github/blob/main/CODE_OF_CONDUCT.md)) to keep our community approachable and respectable.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

Use the table of contents icon on the top left corner of this document to get to a specific section of this guide quickly.

## New contributor guide

To get an overview of the project, read the [README](https://github.com/primitivefinance/arbiter/blob/main/README.md). Here are some resources to help you get started with open source contributions:
To get an overview of the project, read the [README](https://github.com/anthias-labs/arbiter/blob/main/README.md). Here are some resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
Expand All @@ -28,7 +28,7 @@ If you spot a problem with the docs, [search if an issue already exists](https:/

#### Solve an issue

Scan through our [existing issues](https://github.com/primitivefinance/arbiter/issues) to find one that interests you. You can narrow down the search using `labels` as filters. If you find an issue to work on, you are welcome to assign it to yourself and open a PR with a fix.
Scan through our [existing issues](https://github.com/anthias-labs/arbiter/issues) to find one that interests you. You can narrow down the search using `labels` as filters. If you find an issue to work on, you are welcome to assign it to yourself and open a PR with a fix.

### Make Changes

Expand Down Expand Up @@ -62,6 +62,6 @@ Once you submit your PR, a Arbiter team member will review your proposal. We may

### Your PR is merged!

Congratulations :tada::tada: The Primitive Arbiter thanks you :sparkles:.
Congratulations :tada::tada: The Anthias Labs team thanks you :sparkles:.

Once your PR is merged, your contributions will be publicly visible on the [Arbiter Repository](https://github.com/primitivefinance/arbiter).
Once your PR is merged, your contributions will be publicly visible on the [Arbiter Repository](https://github.com/anthias-labs/arbiter).
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ jobs:
with:
check_hidden: true
check_filenames: true
skip: .git,Cargo.lock,target,CHANGELOG.md
skip: .git,Cargo.lock,target,CHANGELOG.md,engine,core,macros,examples,bindings,bin
ignore_words_list: crate,Crate,functio
192 changes: 96 additions & 96 deletions CHANGELOG.md

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.11.0](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.10.3...arbiter-core-v0.11.0) - 2024-04-26
## [0.11.0](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.10.3...arbiter-core-v0.11.0) - 2024-04-26

### Added
- environment logs ([#911](https://github.com/primitivefinance/arbiter/pull/911))
- environment logs ([#911](https://github.com/anthias-labs/arbiter/pull/911))

### Other
- Some repository Tender Loving Care. Should fix release please once merged. ([#959](https://github.com/primitivefinance/arbiter/pull/959))
- *(deps)* bump chrono from 0.4.37 to 0.4.38 ([#954](https://github.com/primitivefinance/arbiter/pull/954))
- *(deps)* bump chrono from 0.4.34 to 0.4.35 ([#930](https://github.com/primitivefinance/arbiter/pull/930))
- Some repository Tender Loving Care. Should fix release please once merged. ([#959](https://github.com/anthias-labs/arbiter/pull/959))
- *(deps)* bump chrono from 0.4.37 to 0.4.38 ([#954](https://github.com/anthias-labs/arbiter/pull/954))
- *(deps)* bump chrono from 0.4.34 to 0.4.35 ([#930](https://github.com/anthias-labs/arbiter/pull/930))

## [0.10.3](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.10.2...arbiter-core-v0.10.3) - 2024-02-20
## [0.10.3](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.10.2...arbiter-core-v0.10.3) - 2024-02-20

### Other
- update Cargo.toml dependencies

## [0.10.2](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.10.1...arbiter-core-v0.10.2) - 2024-02-13
## [0.10.2](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.10.1...arbiter-core-v0.10.2) - 2024-02-13

### Added
- *(arbiter-macros)* `#[arbiter_macros::main]` and a project example ([#880](https://github.com/primitivefinance/arbiter/pull/880))
- *(arbiter-macros)* `#[arbiter_macros::main]` and a project example ([#880](https://github.com/anthias-labs/arbiter/pull/880))

## [0.10.0](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.9.1...arbiter-core-v0.10.0) - 2024-01-23
## [0.10.0](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.9.1...arbiter-core-v0.10.0) - 2024-01-23

### Added
- stream into process
Expand All @@ -41,8 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- tests and test workflow

### Other
- Merge pull request [#811](https://github.com/primitivefinance/arbiter/pull/811) from primitivefinance/dependabot/cargo/chrono-0.4.32
- Merge pull request [#804](https://github.com/primitivefinance/arbiter/pull/804) from primitivefinance/arbiter-core/impl-signer
- Merge pull request [#811](https://github.com/anthias-labs/arbiter/pull/811) from anthias-labs/dependabot/cargo/chrono-0.4.32
- Merge pull request [#804](https://github.com/anthias-labs/arbiter/pull/804) from anthias-labs/arbiter-core/impl-signer
- rm `arbiter-derive`
- Merge branch 'main' into arbiter-engine/world-agent-behaviors
- calling it here
Expand All @@ -62,17 +62,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- messager echo
- *(deps)* bump test-log from 0.2.13 to 0.2.14
- dependencies
- Revert "Merge pull request [#725](https://github.com/primitivefinance/arbiter/pull/725) from quidproquoo/migrate-alloy"
- Revert "Merge pull request [#725](https://github.com/anthias-labs/arbiter/pull/725) from quidproquoo/migrate-alloy"

## [0.9.0](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.8.0...arbiter-core-v0.9.0) - 2023-11-18
## [0.9.0](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.8.0...arbiter-core-v0.9.0) - 2023-11-18

### Other
- *(deps)* bump polars from 0.34.2 to 0.35.2
- arbiter bind doesn't output nested bindings now
- Merge branch 'main' into arbiter_bindings
- arbiter-bindings

## [0.8.0](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.6...arbiter-core-v0.8.0) - 2023-11-14
## [0.8.0](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.6...arbiter-core-v0.8.0) - 2023-11-14

### Fixed
- fix hanging test
Expand All @@ -90,13 +90,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- try w warn and moving to singleton break
- break event collector loop

## [0.7.6](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.5...arbiter-core-v0.7.6) - 2023-11-13
## [0.7.6](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.5...arbiter-core-v0.7.6) - 2023-11-13

### Other
- Merge branch 'main' into feat/client-label
- Update mod.rs

## [0.7.5](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.4...arbiter-core-v0.7.5) - 2023-11-13
## [0.7.5](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.4...arbiter-core-v0.7.5) - 2023-11-13

### Added
- provide `RevmMiddleware` with label field
Expand All @@ -105,19 +105,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- tag allow unused on label
- Merge branch 'main' into feat/client-label

## [0.7.4](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.3...arbiter-core-v0.7.4) - 2023-11-10
## [0.7.4](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.3...arbiter-core-v0.7.4) - 2023-11-10

### Other
- release-plz
- clippy
- Merge branch 'main' into enhance/logging
- Merge pull request [#672](https://github.com/primitivefinance/arbiter/pull/672) from primitivefinance/outputfile_optionality
- Merge pull request [#672](https://github.com/anthias-labs/arbiter/pull/672) from anthias-labs/outputfile_optionality
- abstract data_frame flattening
- Merge branch 'main' into outputfile_optionality
- *(deps)* update serde requirement in /arbiter-core
- *(deps)* bump serde from 1.0.190 to 1.0.191

## [0.7.2](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.1...arbiter-core-v0.7.2) - 2023-11-06
## [0.7.2](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.1...arbiter-core-v0.7.2) - 2023-11-06

### Added
- metadata
Expand All @@ -133,7 +133,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- yo it work
- pubsub implemented

## [0.7.1](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.7.0...arbiter-core-v0.7.1) - 2023-10-30
## [0.7.1](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.7.0...arbiter-core-v0.7.1) - 2023-10-30

### Fixed
- fix test and change output directory
Expand All @@ -146,15 +146,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- remove test
- fmt

## [0.7.0](https://github.com/primitivefinance/arbiter/compare/arbiter-core-v0.6.3...arbiter-core-v0.7.0) - 2023-10-27
## [0.7.0](https://github.com/anthias-labs/arbiter/compare/arbiter-core-v0.6.3...arbiter-core-v0.7.0) - 2023-10-27

### Fixed
- fix data output test to rmdir after completion
- fix clippy + fmt
- fix tests

### Other
- Merge pull request [#656](https://github.com/primitivefinance/arbiter/pull/656) from primitivefinance/colin/fix-event-logger
- Merge pull request [#656](https://github.com/anthias-labs/arbiter/pull/656) from anthias-labs/colin/fix-event-logger
- rm printlns
- fmt
- create valid json
Expand Down
6 changes: 3 additions & 3 deletions core/src/environment/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use super::*;
/// - [`Instruction::SetGasPrice`],
/// - [`Instruction::Stop`],
/// - [`Instruction::Transaction`],

///
/// The [`Instruction`]s are sent to the [`Environment`] via the
/// [`Socket::instruction_sender`] and the results are received via the
/// [`crate::middleware::Connection::outcome_receiver`].
/// [`Socket::instruction_sender`] and the results are received via the
/// [`crate::middleware::Connection::outcome_receiver`].
#[derive(Debug, Clone)]
pub(crate) enum Instruction {
/// An `AddAccount` is used to add a default/unfunded account to the
Expand Down
18 changes: 9 additions & 9 deletions core/src/environment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
//! - [`Environment`]: Represents the Ethereum execution environment, allowing
//! for its management (e.g., starting, stopping) and interfacing with agents.
//! - [`EnvironmentParameters`]: Parameters necessary for creating or modifying
//! an [`Environment`].
//! an [`Environment`].
//! - [`Instruction`]: Enum indicating the type of instruction that is being
//! sent
//! to the EVM.
//! to the EVM.

use std::thread::{self, JoinHandle};

Expand Down Expand Up @@ -59,15 +59,15 @@ pub(crate) type OutcomeReceiver = Receiver<Result<Outcome, ArbiterCoreError>>;
///
/// ## Features
/// * [`revm::Evm`] and its connections to the "outside world" (agents) via the
/// [`Socket`] provide the [`Environment`] a means to route and execute
/// transactions.
/// [`Socket`] provide the [`Environment`] a means to route and execute
/// transactions.
/// * [`ArbiterDB`] is the database structure used that allows for read-only
/// sharing of execution and write-only via the main thread. This can also be a
/// database read in from disk storage via [`database::fork::Fork`].
/// sharing of execution and write-only via the main thread. This can also be a
/// database read in from disk storage via [`database::fork::Fork`].
/// * [`ArbiterInspector`] is an that allows for the EVM to be able to display
/// logs and properly handle gas payments.
/// logs and properly handle gas payments.
/// * [`EnvironmentParameters`] are used to set the gas limit, contract size
/// limit, and label for the [`Environment`].
/// limit, and label for the [`Environment`].
#[derive(Debug)]
pub struct Environment {
/// The label used to define the [`Environment`].
Expand Down Expand Up @@ -695,7 +695,7 @@ pub enum Broadcast {
/// * `input` - The U256 to convert.
/// # Returns
/// * `Ok(U64)` - The converted U64.
/// Used for block number which is a U64.
/// Used for block number which is a U64.
#[inline]
fn convert_uint_to_u64(input: U256) -> Result<U64, ArbiterCoreError> {
let as_str = input.to_string();
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//! and provide optimal performance.
//!
//! For a detailed guide on getting started, check out the
//! [Arbiter Github page](https://github.com/primitivefinance/arbiter/).
//! [Arbiter Github page](https://github.com/amthias-labs/arbiter/).
//!
//! For specific module-level information and examples, navigate to the
//! respective module documentation below.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/getting_started/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We have a few examples to help you get started with Arbiter. These examples are designed to be simple and easy to understand. They are also designed to be easy to run and modify. We hope you find them helpful!

Our examples are in the [examples](https://github.com/primitivefinance/arbiter/tree/main/examples) directory. There are two examples: one for building a simulation and one fork forking the mainnet state.
Our examples are in the [examples](https://github.com/anthias-labs/arbiter/tree/main/examples) directory. There are two examples: one for building a simulation and one fork forking the mainnet state.

## Simulation

Expand All @@ -12,9 +12,9 @@ You can run them with the following command:
cargo run --example project simulate examples/project/configs/example.toml
```

This will run the minimal counter-simulation. The simulation is very minimal and is designed to be easy to understand. It uses an arbiter main macro to derive the `incrementer` behavior for a single agent. Our design philosophy is that the users of Arbiter should only need to define behaviors and a configuration toml for the behaviors. You can see how the behaviors were represented in this simulation in the [behaviors](https://github.com/primitivefinance/arbiter/tree/main/examples/project/behaviors) module. We implement a single behavior for the incrementer struct that deploys the counter on startup and then on the increment event will increment the count.
This will run the minimal counter-simulation. The simulation is very minimal and is designed to be easy to understand. It uses an arbiter main macro to derive the `incrementer` behavior for a single agent. Our design philosophy is that the users of Arbiter should only need to define behaviors and a configuration toml for the behaviors. You can see how the behaviors were represented in this simulation in the [behaviors](https://github.com/anthias-labs/arbiter/tree/main/examples/project/behaviors) module. We implement a single behavior for the incrementer struct that deploys the counter on startup and then on the increment event will increment the count.

For more information on the behavior trait please see the section on [behaviors](https://primitivefinance.github.io/arbiter/usage/arbiter_engine/behaviors.html)
For more information on the behavior trait please see the section on [behaviors](https://anthias-labs.github.io/arbiter/usage/arbiter_engine/behaviors.html)


## Forking
Expand Down
3 changes: 1 addition & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ The data generated by the simulation is then analyzed to detect anomalies. This
>Rule-Based Methods: These methods define rules that describe the system's normal behavior. Any behavior that does not conform to these rules is considered an anomaly.
>Time Series Analysis: In systems where data is collected over time, time series analysis can be used to detect anomalies. This involves looking for patterns or trends in the data over time and identifying any deviations from these patterns. This is one way we at Primitive have used Arbiter to ensure the security of EVM-oriented products.
>Time Series Analysis: In systems where data is collected over time, time series analysis can be used to detect anomalies. This involves looking for patterns or trends in the data over time and identifying any deviations from these patterns.
>>Log Analysis: Many software systems generate logs that record the system's activity. Analyzing these logs can help detect anomalies. This can be done manually or using automated tools.
>>Evaluating and Refining the Model: The detected anomalies are evaluated to determine if they are true anomalies or false positives. The model is refined based on these evaluations to improve its accuracy in detecting abnormalities.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/usage/arbiter_macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Macros can be used for tasks like deriving traits automatically or for generatin
## Procedural Macros

> **`#[derive(Behaviors)]`**
This Rust procedural macro automatically implements the [CreateStateMachine](https://github.com/primitivefinance/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L68) trait for an enum, generating a [create_state_machine](https://github.com/primitivefinance/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L26) method that matches each enum variant to a new state machine instance.
This Rust procedural macro automatically implements the [CreateStateMachine](https://github.com/anthias-labs/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L68) trait for an enum, generating a [create_state_machine](https://github.com/anthias-labs/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L26) method that matches each enum variant to a new state machine instance.
It's designed for enums where each variant contains a single unnamed field representing state data.
This macro simplifies the creation of state machines from enums, eliminating repetitive boilerplate code and enhancing code maintainability.

Expand Down Expand Up @@ -36,14 +36,14 @@ enum Behaviors {
```

> **`#[main]`**.
The [`#[arbiter_macros::main]`](https://github.com/primitivefinance/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L161) macro in `arbiter-macros/src/lib.rs` is designed to simplify the creation of a CLI that will let you run your simulations by automatically generating a `main` function that sets up command-line parsing, logging, async execution, and world creation.
The [`#[arbiter_macros::main]`](https://github.com/anthias-labs/arbiter/blob/ffbbd146dc05f3e1088a9df5cf78452a1bef2212/macros/src/lib.rs#L161) macro in `arbiter-macros/src/lib.rs` is designed to simplify the creation of a CLI that will let you run your simulations by automatically generating a `main` function that sets up command-line parsing, logging, async execution, and world creation.
It takes custom attributes to configure the application's metadata such as the project's name, description, and the set of behaviors you want to use.
Under the hood, it uses the [clap](https://crates.io/crates/clap) crate for parsing CLI arguments and [tracing](https://crates.io/crates/tracing) for logging based on verbosity level.
The macro needs to have have an object that has the `CreateStateMachine` trait implemented which can be done using the `#[derive(Behaviors)]` macro.


## Usage
You can find an example that uses both of these macros in the [arbiter-template repository](https://github.com/primitivefinance/arbiter-template).
You can find an example that uses both of these macros in the [arbiter-template repository](https://github.com/anthias-labs/arbiter-template).
Similarly, in the Arbiter repo itself, this exact same collection of code is found in the `examples/template/` directory.

If you wanted to use the `#[main]` macro alongside the `#[derive(Behaviors)]` macro, you would do so like this:
Expand Down
Loading

0 comments on commit 56a4b7a

Please sign in to comment.