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: support ConsensusParams.VersionParams.consensus_version from Tenderdash 1.3 #101

Merged
merged 2 commits into from
Sep 19, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: docker logs tenderdash > tenderdash.log 2>&1

- name: Archive docker logs
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
if: failure()
with:
name: tenderdash.log
Expand Down
4 changes: 4 additions & 0 deletions proto-compiler/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,8 @@ pub static CUSTOM_FIELD_ATTRIBUTES: &[(&str, &str)] = &[
".tendermint.types.VersionParams.app_version",
QUOTED_WITH_DEFAULT,
),
(
".tendermint.types.VersionParams.consensus_version",
QUOTED_WITH_DEFAULT,
),
];
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.1.0";
const DEFAULT_VERSION: &str = "68a03d69dcfaa64a6edb829b6efed40e72e8e7bd";

// check if TENDERDASH_COMMITISH is already set; if not, set it to the current
// version
Expand Down
4 changes: 3 additions & 1 deletion proto/tests/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub fn test_consensus_params_serde() {
]
},
"version": {
"consensus_version": "1",
"app_version": "1"
},
"synchrony": {
Expand All @@ -173,5 +174,6 @@ pub fn test_consensus_params_serde() {
}
"#;

let _new_params: ConsensusParams = serde_json::from_str(json).unwrap();
let new_params: ConsensusParams = serde_json::from_str(json).unwrap();
assert_eq!(new_params.version.unwrap().consensus_version, 1)
}
Loading