Skip to content

Commit

Permalink
penumbra: misc small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Feb 2, 2024
1 parent 9c92764 commit 6e6584a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/core/component/sct/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[package]
# TODO: merge with tct crate under a `component` feature flag?
name = "penumbra-sct"
version = "0.65.0-alpha.1"
edition = "2021"
Expand All @@ -11,6 +10,7 @@ component = [
"cnidarium",
"cnidarium-component",
"penumbra-proto/cnidarium",
"penumbra-proto/rpc",
"tonic",
]
default = ["std", "component"]
Expand Down
16 changes: 10 additions & 6 deletions crates/core/component/sct/src/component/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// The SCT component implementation.
pub mod sct;
// Blockchain clocks: epoch indices, block heights and timestamps.
//! The Sct component contains the interface to the chain's state commitment tree
//! and nullifier set. It also serves as tracking the various chain clocks, whether
//! logical, like an epoch index, or a block height, or physical, like block timestamps.
/// Blockchain clocks: epoch indices, block heights and timestamps.
pub mod clock;
// Implementation of the SCT component query server.
/// Implementation of the SCT component query server.
pub mod rpc;
// Tracking commitment sources within a block execution.
/// The SCT component implementation.
pub mod sct;
/// Tracking commitment sources within a block execution.
pub mod source;
// Mediate access to the state commitment tree and related data.
/// Mediate access to the state commitment tree and related data.
pub mod tree;

// Access to configuration data for the component.
Expand Down
5 changes: 2 additions & 3 deletions crates/core/component/sct/src/component/rpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use cnidarium::Storage;
use penumbra_proto::core::component::sct::v1alpha1::{
query_service_server::QueryService, EpochByHeightRequest, EpochByHeightResponse,
};
use penumbra_proto::core::component::sct::v1alpha1::query_service_server::QueryService;
use penumbra_proto::core::component::sct::v1alpha1::{EpochByHeightRequest, EpochByHeightResponse};
use tonic::Status;
use tracing::instrument;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/sct/src/component/sct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Component for Sct {
},
);
}
None => {}
None => { /* no-op until an upgrade occurs */ }
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/sct/src/component/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pub trait VerificationExt: StateRead {
anyhow::bail!(
"nullifier {} was already spent in {:?}",
nullifier,
hex::encode(&info.id),
hex::encode(info.id),
);
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/view/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ async fn sct_divergence_check(

let value = client
.key_value(penumbra_proto::cnidarium::v1alpha1::KeyValueRequest {
key: sct_state_key::anchor_by_height(height),
key: sct_state_key::tree::anchor_by_height(height),
..Default::default()
})
.await?
Expand Down

0 comments on commit 6e6584a

Please sign in to comment.