Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(abci): add RequestFinalizeSnapshot #119

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tracing-subscriber = { version = "0.3.18", optional = true, default-features = f
"ansi",
"env-filter",
] }
serde_json = { version = "1.0.128", optional = true }
serde_json = { version = "1.0", optional = true }
thiserror = { version = "2.0.3" }
url = { version = "2.5.0" }
semver = { version = "1.0.22" }
Expand Down
8 changes: 8 additions & 0 deletions abci/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ pub trait Application {
Ok(Default::default())
}

fn finalize_snapshot(
&self,
_request: abci::RequestFinalizeSnapshot,
) -> Result<abci::ResponseFinalizeSnapshot, abci::ResponseException> {
Ok(Default::default())
}
lklimek marked this conversation as resolved.
Show resolved Hide resolved

fn extend_vote(
&self,
_request: abci::RequestExtendVote,
Expand Down Expand Up @@ -169,6 +176,7 @@ impl<A: Application> RequestDispatcher for A {
request::Value::ApplySnapshotChunk(req) => {
self.apply_snapshot_chunk(req).map(|v| v.into())
},
request::Value::FinalizeSnapshot(req) => self.finalize_snapshot(req).map(|v| v.into()),
request::Value::ListSnapshots(req) => self.list_snapshots(req).map(|v| v.into()),
request::Value::PrepareProposal(req) => self.prepare_proposal(req).map(|v| v.into()),
request::Value::ProcessProposal(req) => self.process_proposal(req).map(|v| v.into()),
Expand Down
1 change: 1 addition & 0 deletions abci/src/tracing_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ fn abci_method_name(request: &Value) -> String {
Value::InitChain(_) => "InitChain",
Value::ListSnapshots(_) => "ListSnapshots",
Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk",
Value::FinalizeSnapshot(_) => "FinalizeSnapshot",
Value::OfferSnapshot(_) => "OfferSnapshot",
Value::PrepareProposal(_) => "PrepareProposal",
Value::ProcessProposal(_) => "ProcessProposal",
Expand Down
4 changes: 1 addition & 3 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ derive_more = { version = "1.0", features = ["from", "from_str"] }


[dev-dependencies]
serde_json = { version = "1.0.125", default-features = false, features = [
"alloc",
] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }

[build-dependencies]
tenderdash-proto-compiler = { path = "../proto-compiler" }
2 changes: 1 addition & 1 deletion proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tenderdash_proto_compiler::GenerationMode;

fn main() {
// default Tenderdash version to use if TENDERDASH_COMMITISH is not set
const DEFAULT_VERSION: &str = "v1.3.0";
const DEFAULT_VERSION: &str = "9d3dae43c3803d5372e2b45a087fd1c0f46192fe";

// check if TENDERDASH_COMMITISH is already set; if not, set it to the current
// version
Expand Down
Loading