Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ jobs:
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish inspector
run: cargo publish --manifest-path inspector/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
25 changes: 22 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
members = [
"chain",
"client",
"inspector",
"types",
]
resolver = "2"

[workspace.dependencies]
alto-client = { version = "0.0.2", path = "client" }
alto-types = { version = "0.0.2", path = "types" }
alto-client = { version = "0.0.3", path = "client" }
alto-types = { version = "0.0.3", path = "types" }
commonware-consensus = { version = "0.0.40" }
commonware-cryptography = { version = "0.0.40" }
commonware-deployer = { version = "0.0.40" }
Expand All @@ -30,6 +31,7 @@ tracing = "0.1.41"
tracing-subscriber = "0.3.19"
governor = "0.6.3"
prometheus-client = "0.22.3"
clap = "4.5.18"

[profile.bench]
# Because we enable overflow checks in "release," we should benchmark with them.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* [chain](./chain/README.md): A minimal blockchain built with the [Commonware Library](https://github.com/commonwarexyz/monorepo).
* [client](./client/README.md): Client for interacting with `alto`.
* [inspector](./inspector/README.md): Monitor `alto` activity.
* [types](./types/README.md): Common types used throughout `alto`.

## Licensing
Expand Down
5 changes: 3 additions & 2 deletions chain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alto-chain"
version = "0.0.2"
version = "0.0.3"
publish = true
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -12,6 +12,7 @@ documentation = "https://docs.rs/alto-chain"

[dependencies]
alto-types = { workspace = true }
alto-client = { workspace = true }
commonware-consensus = { workspace = true }
commonware-cryptography = { workspace = true }
commonware-deployer = { workspace = true }
Expand All @@ -30,8 +31,8 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["fmt", "json"] }
governor = { workspace = true }
prometheus-client = { workspace = true }
clap = { workspace = true }
sysinfo = "0.33.1"
clap = "4.5.18"
axum = "0.8.1"
uuid = "1.15.1"
serde = { version = "1.0.218", features = ["derive"] }
Expand Down
10 changes: 9 additions & 1 deletion chain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ cargo install commonware-deployer
### Create Deployer Artifacts

```bash
cargo run --bin setup -- --peers 10 --bootstrappers 2 --regions us-west-1,us-east-1,eu-west-1,ap-northeast-1,eu-north-1,ap-south-1,sa-east-1,eu-central-1,ap-northeast-2,ap-southeast-2 --instance-type c7g.xlarge --storage-size 10 --storage-class gp3 --worker-threads 4 --message-backlog 16384 --mailbox-size 16384 --dashboard dashboard.json --output assets
cargo run --bin setup -- generate --peers 10 --bootstrappers 2 --regions us-west-1,us-east-1,eu-west-1,ap-northeast-1,eu-north-1,ap-south-1,sa-east-1,eu-central-1,ap-northeast-2,ap-southeast-2 --instance-type c7g.xlarge --storage-size 10 --storage-class gp3 --worker-threads 4 --message-backlog 16384 --mailbox-size 16384 --dashboard dashboard.json --output assets
```

### [Optional] Configure Indexer Upload

```bash
cargo run --bin setup -- indexer --dir assets --url <indexer URL>
```

_The indexer URL is configured separately because it is typically only known after the threshold key is generated (derived in `setup generate`)._

### Build Validator Binary

#### Build Cross-Platform Compiler
Expand Down
2 changes: 1 addition & 1 deletion chain/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "engine_syncer_latest_height{job=~\"$Validator\", region=~\"$Region\"}",
"expr": "engine_syncer_finalized_height{job=~\"$Validator\", region=~\"$Region\"}",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "{{job}} ({{instance}})",
Expand Down
12 changes: 7 additions & 5 deletions chain/src/actors/application/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
Config,
};
use crate::actors::syncer;
use alto_types::{Block, Finalization, Notarization};
use alto_types::{Block, Finalization, Notarization, Seed};
use commonware_consensus::threshold_simplex::Prover;
use commonware_cryptography::{sha256::Digest, Hasher, Sha256};
use commonware_macros::select;
Expand Down Expand Up @@ -215,21 +215,23 @@ impl<R: Rng + Spawner + Metrics + Clock> Actor<R> {
}
Message::Prepared { proof, payload } => {
// Parse the proof
let (view, parent, _, signature, _) =
let (view, parent, _, signature, seed) =
self.prover.deserialize_notarization(proof).unwrap();
let notarization = Notarization::new(view, parent, payload, signature.into());
let seed = Seed::new(view, seed.into());

// Send the notarization to the syncer
syncer.notarized(notarization).await;
syncer.notarized(notarization, seed).await;
}
Message::Finalized { proof, payload } => {
// Parse the proof
let (view, parent, _, signature, _) =
let (view, parent, _, signature, seed) =
self.prover.deserialize_finalization(proof.clone()).unwrap();
let finalization = Finalization::new(view, parent, payload, signature.into());
let seed = Seed::new(view, seed.into());

// Send the finalization to the syncer
syncer.finalized(finalization).await;
syncer.finalized(finalization, seed).await;
}
}
}
Expand Down
Loading