Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
eae4c87
add availability endpoint
ss-es Apr 23, 2026
b5c2851
update proto definitions with more detail
ss-es Apr 24, 2026
9f26eab
remove types defined in axum.rs
ss-es Apr 24, 2026
4bf2129
remove unhelpful comments
ss-es Apr 24, 2026
e1a08f0
cleanup
ss-es Apr 24, 2026
1192448
collapse swagger by default
ss-es Apr 24, 2026
be65c6f
add example values
ss-es Apr 24, 2026
d94ea9e
cleanup
ss-es Apr 24, 2026
592fea6
cleanup examples
ss-es Apr 27, 2026
3fc97f3
update readme
ss-es Apr 27, 2026
318ebee
Merge branch 'main' into ss/axum-2
ss-es Apr 27, 2026
e4ec214
fix formatting
ss-es Apr 27, 2026
33e6ca2
update with serialization fixes/cleanup
ss-es Apr 27, 2026
a6d2f64
fix inconsistency
ss-es Apr 27, 2026
846fe8d
move descriptions into routes
ss-es Apr 27, 2026
bdbb33d
clippy
ss-es Apr 27, 2026
67c708c
cargo sort
ss-es Apr 27, 2026
178357d
update
ss-es Apr 27, 2026
408e4dc
add new v1 API tests
ss-es May 1, 2026
06c508a
fix reward merkle tree
ss-es May 1, 2026
f94e2a4
fix reward balance endpoint
ss-es May 1, 2026
ab8103e
refactor test
ss-es May 1, 2026
96ac79a
fix latest reward balance
ss-es May 1, 2026
7d86f58
fix routes
ss-es May 1, 2026
dafaccd
fix test
ss-es May 1, 2026
d6f02f5
rustfmt
ss-es May 1, 2026
f28b106
fix reward-amounts
ss-es May 1, 2026
5a678c8
Merge branch 'ss/axum-tests-1' into ss/axum-2
ss-es May 4, 2026
9d917b1
add parity tests
ss-es May 4, 2026
9864160
update incorrect_encoding_proof
ss-es May 6, 2026
6ad876c
u32 -> u64
ss-es May 6, 2026
c030d35
fix examples
ss-es May 6, 2026
3a35fa3
Merge branch 'main' into ss/axum-2
ss-es May 6, 2026
37a45f8
migrate remaining availability endpoints
ss-es May 7, 2026
3b7072f
Merge branch 'main' into ss/axum-2
ss-es May 7, 2026
3e50cc1
Merge branch 'ss/axum-2' into ss/axum-4
ss-es May 7, 2026
6d27c4f
Merge branch 'main' into ss/axum-4
ss-es May 8, 2026
ea6899d
rustfmt
ss-es May 8, 2026
7bc49be
add websocket endpoints
ss-es May 8, 2026
ca82e04
add namespace proof websocket
ss-es May 8, 2026
ccd282b
sort
ss-es May 8, 2026
c7298e8
clippy
ss-es May 8, 2026
79cf683
fix stack overflow
ss-es May 8, 2026
e3e0a30
start websocket stream earlier
ss-es May 8, 2026
45d645b
clean up log
ss-es May 8, 2026
6662fb5
Merge branch 'main' into ss/axum-4
ss-es May 8, 2026
d126eac
fix
ss-es May 8, 2026
6e54a63
spawn thread with 16MB stack
ss-es May 8, 2026
f4ed102
fix?
ss-es May 8, 2026
b7517c5
fix
ss-es May 8, 2026
bf1a4c1
fix?
ss-es May 9, 2026
492847d
fix
ss-es May 12, 2026
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
35 changes: 34 additions & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async-trait = "0.1"
atomic = "0.6"
atomic_store = { git = "https://github.com/EspressoSystems/atomicstore.git", tag = "0.1.5" }
automod = "1.0.14"
axum = "0.8.8"
axum = { version = "0.8.8", features = ["ws"] }
backoff = "0.4"
base64 = "0.22"
base64-bytes = "0.1"
Expand Down
8 changes: 4 additions & 4 deletions crates/cliquenet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ bytes = { workspace = true }
ed25519-compact = { workspace = true }
parking_lot = { workspace = true }
rand = "0.10.0"

# optional:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo?

serde = { workspace = true, features = ["derive"], optional = true }
serde_bytes = { workspace = true, optional = true }
snow = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["macros", "net", "rt", "time"] }
tokio-util = { workspace = true, features = ["join-map"] }
tracing = { workspace = true }

# optional:
serde = { workspace = true, features = ["derive"], optional = true }
serde_bytes = { workspace = true, optional = true }

[dev-dependencies]
criterion = { workspace = true }
quickcheck = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/espresso/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ anyhow = { workspace = true }
async-trait = { workspace = true }
axum = { workspace = true }
base64 = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
prost = { workspace = true }
schemars = { workspace = true }
Expand Down
134 changes: 134 additions & 0 deletions crates/espresso/api/examples/test_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ impl v1::AvailabilityApi for TestApi {
Ok(vec![0xde, 0xad, 0xbe, 0xef])
}

async fn stream_namespace_proofs(
&self,
_from: usize,
_namespace: u32,
) -> Result<futures::stream::BoxStream<'static, Self::NamespaceProofQueryData>> {
Ok(Box::pin(futures::stream::empty()))
}

async fn get_state_cert(&self, epoch: u64) -> Result<Self::StateCertQueryDataV1> {
tracing::info!("v1: get_state_cert(epoch={})", epoch);
Ok(vec![0x01, 0x02, 0x03])
Expand All @@ -181,6 +189,132 @@ impl v1::AvailabilityApi for TestApi {
}
}

// Stub HotShotAvailabilityApi for the example — returns empty/unit data.
#[async_trait]
impl v1::HotShotAvailabilityApi for TestApi {
type Leaf = serde_json::Value;
type Block = serde_json::Value;
type Header = serde_json::Value;
type Payload = serde_json::Value;
type VidCommon = serde_json::Value;
type Transaction = serde_json::Value;
type TransactionWithProof = serde_json::Value;
type BlockSummary = serde_json::Value;
type Limits = serde_json::Value;
type Cert2 = serde_json::Value;

async fn get_leaf(&self, _id: v1::LeafId) -> Result<Self::Leaf> {
Ok(serde_json::json!({}))
}
async fn get_leaf_range(&self, _from: usize, _until: usize) -> Result<Vec<Self::Leaf>> {
Ok(vec![])
}
async fn get_header(&self, _id: v1::BlockId) -> Result<Self::Header> {
Ok(serde_json::json!({}))
}
async fn get_header_range(&self, _from: usize, _until: usize) -> Result<Vec<Self::Header>> {
Ok(vec![])
}
async fn get_block(&self, _id: v1::BlockId) -> Result<Self::Block> {
Ok(serde_json::json!({}))
}
async fn get_block_range(&self, _from: usize, _until: usize) -> Result<Vec<Self::Block>> {
Ok(vec![])
}
async fn get_payload(&self, _id: v1::PayloadId) -> Result<Self::Payload> {
Ok(serde_json::json!({}))
}
async fn get_payload_range(&self, _from: usize, _until: usize) -> Result<Vec<Self::Payload>> {
Ok(vec![])
}
async fn get_vid_common(&self, _id: v1::BlockId) -> Result<Self::VidCommon> {
Ok(serde_json::json!({}))
}
async fn get_vid_common_range(
&self,
_from: usize,
_until: usize,
) -> Result<Vec<Self::VidCommon>> {
Ok(vec![])
}
async fn get_transaction_by_position(
&self,
_height: u64,
_index: u64,
) -> Result<Self::Transaction> {
Ok(serde_json::json!({}))
}
async fn get_transaction_by_hash(&self, _hash: String) -> Result<Self::Transaction> {
Ok(serde_json::json!({}))
}
async fn get_transaction_proof_by_position(
&self,
_height: u64,
_index: u64,
) -> Result<Self::TransactionWithProof> {
Ok(serde_json::json!({}))
}
async fn get_transaction_proof_by_hash(
&self,
_hash: String,
) -> Result<Self::TransactionWithProof> {
Ok(serde_json::json!({}))
}
async fn get_block_summary(&self, _height: usize) -> Result<Self::BlockSummary> {
Ok(serde_json::json!({}))
}
async fn get_block_summary_range(
&self,
_from: usize,
_until: usize,
) -> Result<Vec<Self::BlockSummary>> {
Ok(vec![])
}
async fn get_limits(&self) -> Result<Self::Limits> {
Ok(serde_json::json!({"small_object_range_limit": 500, "large_object_range_limit": 100}))
}
async fn get_cert2(&self, _height: u64) -> Result<Option<Self::Cert2>> {
Ok(None)
}
async fn stream_leaves(
&self,
_from: usize,
) -> Result<futures::stream::BoxStream<'static, Self::Leaf>> {
Ok(Box::pin(futures::stream::empty()))
}
async fn stream_headers(
&self,
_from: usize,
) -> Result<futures::stream::BoxStream<'static, Self::Header>> {
Ok(Box::pin(futures::stream::empty()))
}
async fn stream_blocks(
&self,
_from: usize,
) -> Result<futures::stream::BoxStream<'static, Self::Block>> {
Ok(Box::pin(futures::stream::empty()))
}
async fn stream_payloads(
&self,
_from: usize,
) -> Result<futures::stream::BoxStream<'static, Self::Payload>> {
Ok(Box::pin(futures::stream::empty()))
}
async fn stream_vid_common(
&self,
_from: usize,
) -> Result<futures::stream::BoxStream<'static, Self::VidCommon>> {
Ok(Box::pin(futures::stream::empty()))
}
async fn stream_transactions(
&self,
_from: usize,
_namespace: Option<u32>,
) -> Result<futures::stream::BoxStream<'static, Self::Transaction>> {
Ok(Box::pin(futures::stream::empty()))
}
}

// Implement v2::RewardApi (simplified API - latest-only for claim/balance/proof)
#[async_trait]
impl v2::RewardApi for TestApi {
Expand Down
Loading
Loading