Skip to content

Commit e53af77

Browse files
authored
Merge pull request astraly-labs#4 from baitcode/docs
Some doumentation fixes
2 parents 8b92ba2 + 8cae7d9 commit e53af77

File tree

13 files changed

+45
-45
lines changed

13 files changed

+45
-45
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Welcome to the Arbiter contributing guide <!-- omit in toc -->
1+
# Welcome to the Starkbiter contributing guide <!-- omit in toc -->
22

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

@@ -55,7 +55,7 @@ When you're finished with the changes, create a pull request, also known as a PR
5555
- Make sure your additions are properly documented! You can see the [Rust book](https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html) for documentation guidelines. Each module uses the diagnostic attribute `#![warn(missing_docs)]` which will trigger clippy in our CI.
5656
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
5757
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
58-
Once you submit your PR, a Arbiter team member will review your proposal. We may ask questions or request additional information.
58+
Once you submit your PR, a Starkbiter team member will review your proposal. We may ask questions or request additional information.
5959
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
6060
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
6161
- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
```bash
2-
# ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
3-
# ░░ ░░░ ░░░ ░░░ ░░░░ ░░ ░░░ ░░ ░░ ░░ ░░
4-
# ▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒ ▒▒ ▒▒▒ ▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒
5-
# ▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓
6-
# ██████ ████ █████ ██ ███ ███ ████ █████ ████████ █████ ████████ ███ ██
7-
# ██ █████ █████ ███ ██ ████ ██ ███ ████ █████ ██ ████ █
8-
# ██████████████████████████████████████████████████████████████████████████████████████████
2+
# ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
3+
# ░░ ░░░ ░░░ ░░░ ░░░░ ░░░ ░░ ░░░ ░░ ░░ ░░ ░░
4+
# ▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒ ▒▒ ▒▒▒ ▒▒▒ ▒▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒
5+
# ▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓
6+
# ██████ ████ █████ ██ ███ ███ ██ ███ ███ █████ █████ █████ ██████ ███ ██
7+
# ██ █████ █████ ███ ██ ████ ██ ███ ██ ███ ████ █████ ██ ████ █
8+
# ██████████████████████████████████████████████████████████████████████████████████████████
99
```
1010
> Expanding the Starknet tooling ecosystem.
1111
@@ -15,17 +15,17 @@
1515
## Overview
1616
> **Starkbiter** is a framework for orchestrating event based agentic simulations on top of Starknet Devnet sandbox.
1717
18-
Arbiter provides a Full JSON-RPC Starknet Node capabilities with additional methods to control block production, contract and account deployments and declaration. It integrates deeply with starknet-devnet and starknet-rs types crates allowing for seamless integration for all the tooling that depends on those. Thus, it also provides additional layer of well known contract bindings generated by [cainome](https://github.com/cartridge-gg/cainome).
18+
Starkbiter provides a Full JSON-RPC Starknet Node capabilities with additional methods to control block production, contract and account deployments and declaration. It integrates deeply with starknet-devnet and starknet-rs types crates allowing for seamless integration for all the tooling that depends on those. Thus, it also provides additional layer of well known contract bindings generated by [cainome](https://github.com/cartridge-gg/cainome).
1919

2020
The primary use of Starkbiter is to probe the mechanism security of smart contracts, and perform advanced economic modelling.
2121

2222
---
2323

24-
The Arbiter workspace has five crates:
24+
The Starkbiter workspace has five crates:
2525
- `starkbiter`: The bin that exposes a command line interface for contract bindings.
26-
- `starkbiter-core`: A lib containing the core logic for the Arbiter framework, including the `StarkbiterMiddleware` discussed before, and the `Environment`, our sandbox.
26+
- `starkbiter-core`: A lib containing the core logic for the Starkbiter framework, including the `StarkbiterMiddleware` discussed before, and the `Environment`, our sandbox.
2727
- `starkbiter-engine`: A lib that provides abstractions for building simulations, agents, and behaviors.
28-
- `starkbiter-macros`: A lib crate that contains the macros used to simplify development with Arbiter.
28+
- `starkbiter-macros`: A lib crate that contains the macros used to simplify development with Starkbiter.
2929
- `starkbiter-bindings`: A lib crate containing bindings for utility smart contracts used for testing and development.
3030

3131
## WIP
@@ -60,7 +60,7 @@ A financial engineer may want to test their strategies against thousands of mark
6060
Likewise, the same engineer may want to develop searcher agents, solver agents, or other autonomous agents that can be run on the blockchain.
6161

6262
## Working with the Starkbiter Framework
63-
To work with Arbiter, you must have Rust installed on your machine.
63+
To work with Starkbiter, you must have Rust installed on your machine.
6464
You can install Rust by following the instructions [here](https://www.rust-lang.org/tools/install).
6565
It will also be helpful to get the `cargo-generate` package, which you can install by doing:
6666
```bash
@@ -92,7 +92,7 @@ To install the Starkbiter binary, run:
9292
```bash
9393
cargo install starkbiter
9494
```
95-
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.
95+
This will install the Starkbiter binary on your machine. You can then run `starkbiter --help` to see that Starkbiter was correctly installed and see the help menu.
9696

9797
### Bindings
9898
You can put your compiled sierra 1.0 contract jsons in the `contracts/` directory of your templated project, you'll need to run:
@@ -120,7 +120,7 @@ This will instantiate environment which will upon request fetch missing bits of
120120

121121
## Cargo Docs
122122

123-
To see the Cargo docs for the Arbiter crates, please visit the following:
123+
To see the Cargo docs for the Starkbiter crates, please visit the following:
124124
- [`starkbiter`](https://docs.rs/crate/starkbiter/)
125125
- [`starkbiter-bindings`](https://docs.rs/crate/starkbiter-bindings/)
126126
- [`starkbiter-core`](https://docs.rs/starkbiter-core/)

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Furthermore, Starkbiter provides containment and management for simulations.
77
## Overview
88
The Starkbiter workspace has three crates:
99
- `starkbiter`: The binary crate that exposes a command line interface for initializing simulations via a templated repository and generating contract bindings needed for the simulation.
10-
- `starkbiter-core`: The lib crate that contains the core logic for the Arbiter framework including the `StarkbiterMiddleware` discussed before, the `Environment` which envelopes simulations, and the `Manager` who controls a collection of environments.
10+
- `starkbiter-core`: The lib crate that contains the core logic for the Starkbiter framework including the `StarkbiterMiddleware` discussed before, the `Environment` which envelopes simulations, and the `Manager` who controls a collection of environments.
1111
- `starkbiter-engine`: The lib crate that provides abstractions for building simulations and more.
1212

1313
The purpose of Starkbiter is to provide a toolset to construct arbitrary agents (defined in Rust, by smart contracts, or even other foreign function interfaces) and have these agents interact with an Ethereum-like environment of your design.
@@ -50,7 +50,7 @@ The first and most crucial step is to model the system. A well-modeled system ac
5050
These methods model the system's normal behavior using statistical models and then use these models to detect deviations. To model things well, people use techniques such as mean, median, and standard deviation, or more complex models like regression models can be used. For example, the Poisson distribution gives the probability of an event happening a certain number of times (k) within a given interval of time or space. So, you can quantify an average number of occurrences of some action (say, to model the behavior of a retail agent or network congestion from certain events). In that case, you can model this well with the Poisson distribution.
5151

5252
### Defining Normal Behavior: Agent design
53-
Once the system is modeled, the next step is to define what constitutes normal behavior for the system. This could be based on historical data, expert knowledge, or both. This is not a feature of Arbiter yet (The starkbiter-engine crate is a WIP but contains some of our initial work on this). This can be incredibly simple (passive behavior) or complex (interactive behavior). But the better they model the system, the better the results. For example, you can model LPs as more passive agents that deposit and withdraw liquidity based on some average occurrences. In contrast, arbitrageurs can be modeled as more interactive agents that react to certain events or `SLAOD's on specific memory locations. As the agents start to resemble real-world actors, the results will be more accurate, and the data will be more beneficial for the system designers.
53+
Once the system is modeled, the next step is to define what constitutes normal behavior for the system. This could be based on historical data, expert knowledge, or both. This is not a feature of Starkbiter yet (The starkbiter-engine crate is a WIP but contains some of our initial work on this). This can be incredibly simple (passive behavior) or complex (interactive behavior). But the better they model the system, the better the results. For example, you can model LPs as more passive agents that deposit and withdraw liquidity based on some average occurrences. In contrast, arbitrageurs can be modeled as more interactive agents that react to certain events or `SLAOD's on specific memory locations. As the agents start to resemble real-world actors, the results will be more accurate, and the data will be more beneficial for the system designers.
5454

5555
### Simulating the System
5656
The system is then simulated over some time. During this simulation, the agents interact with each other and their environment, generating data that reflects the system's behavior. You can decide on specific parameters and configurations for the system. Designating the system simulation to be as close to the real-world system as possible is recommended. For example, historically or with price processes, we can model a sequence of prices for arbitrageurs. The speed and performance of the simulation have made it possible for you to get more data by doing the latter.

docs/src/usage/arbiter_cli.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Arbiter CLI
1+
# Starkbiter CLI
22
Arbiter provides a Foundry-like CLI experience. You can initialize new projects, generate bindings and execute simulations using the CLI.
33

4-
To create a new Arbiter project:
4+
To create a new Starkbiter project:
55
```bash
66
arbiter init your-new-project
77
cd your-new-project
88
```
9-
This initializes a new Arbiter project with a template.
9+
This initializes a new Starkbiter project with a template.
1010
You can run `arbiter init <simulation_name> --no-git` to remove the `.git` directory from the template upon initialization.
1111

1212
## Bindings
@@ -19,9 +19,9 @@ The contract bindings are generated via Foundry's `forge` command.
1919
You can generate the bindings again by running:
2020

2121
```bash
22-
arbiter bind
22+
starkbiter bind
2323
```
24-
Arbiter bind wraps `forge bind` and is configured from your cargo.toml. There are three optional fields you can add to your toml to configure arbiter bind.
24+
Starkbiter bind wraps `forge bind` and is configured from your cargo.toml. There are three optional fields you can add to your toml to configure starkbiter bind.
2525
```toml
2626
[arbiter]
2727
bindings_workspace = "simulation" # must be a valid workspace member
@@ -35,7 +35,7 @@ The template is executable at this point and you can run it by running:
3535
cargo run
3636
```
3737

38-
You can load or write your own smart contracts in the templates `contracts/` directory and begin writing your own simulations. Arbiter treats Rust smart-contract bindings as first-class citizens. The contract bindings are generated via Foundry's forge command. arbiter bind wraps forge with some convenience features that will generate all your bindings to `src/bindings` as a rust module. Foundry power-users are welcome to use forge directly. You can also manage project dependencies using git submodules via `forge install`. The [Foundry book](https://book.getfoundry.sh/reference/forge/forge-install) provides further details on managing project dependencies and other features.
38+
You can load or write your own smart contracts in the templates `contracts/` directory and begin writing your own simulations. Starkbiter treats Rust smart-contract bindings as first-class citizens. The contract bindings are generated via Foundry's forge command. starkbiter bind wraps forge with some convenience features that will generate all your bindings to `src/bindings` as a rust module. Foundry power-users are welcome to use forge directly. You can also manage project dependencies using git submodules via `forge install`. The [Foundry book](https://book.getfoundry.sh/reference/forge/forge-install) provides further details on managing project dependencies and other features.
3939

4040

4141
## Forking
@@ -45,7 +45,7 @@ An example is provided in the `example_fork` directory.
4545
Essentially, you provide your storage location for the data, the network you want the block number you want, and metadata about the contracts you want to fork.
4646

4747
```bash
48-
arbiter fork <fork_config.toml>
48+
starkbiter fork <fork_config.toml>
4949
```
5050

5151
This will create a fork of the network you specified in the config file and store it in the location you specified.
@@ -54,4 +54,4 @@ It can then be loaded into an `starkbiter-core` `Environment` by using the `Fork
5454
Forking is done this way to make sure that all emulation done does not require a constant connection to an RPC-endpoint.
5555

5656
**Optional Arguments**
57-
You can run `arbiter fork <fork_config.toml> --overwrite` to overwrite the fork if it already exists.
57+
You can run `starkbiter fork <fork_config.toml> --overwrite` to overwrite the fork if it already exists.

docs/src/usage/arbiter_engine/agents_and_engines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The latter will also require a `stream::select` type of operation to merge all t
1111

1212
## `struct Agent`
1313
The `Agent` struct is the primary struct that you will be working with.
14-
It contains an ID, a client (`Arc<RevmMiddleware>`) that provides means to send calls and transactions to an Arbiter `Environment`, and a `Messager`.
14+
It contains an ID, a client (`Arc<RevmMiddleware>`) that provides means to send calls and transactions to an Starkbiter `Environment`, and a `Messager`.
1515
It looks like this:
1616
```rust, ignore
1717
pub struct Agent {

docs/src/usage/arbiter_engine/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `Behavior<E>` has two methods: `startup` and `process`.
2121
It can also be streamed and used for processing messages in a `Behavior<Message>`.
2222
- `Agent` also owns a `Vec<Box<dyn StateMachine>>` which is a list of `StateMachine`s that the `Agent` will run.
2323
This is a way for `Agent`s to have multiple `Behavior`s that may not use the same event type.
24-
- `World` is a struct that has an ID, an Arbiter `Environment`, a mapping of `Agent`s, and a `Messager`.
24+
- `World` is a struct that has an ID, an Starkbiter `Environment`, a mapping of `Agent`s, and a `Messager`.
2525
- The `World` is tasked with letting `Agent`s join in, and when they do so, to connect them to the `Environment` with a client and `Messager` with the `Agent`'s ID.
2626
- `Universe` is a struct that wraps a mapping of `World`s.
2727
- The `Universe` is tasked with letting `World`s join in and running those `World`s in parallel.

0 commit comments

Comments
 (0)