Skip to content

Commit

Permalink
feat: support ConsensusParams.VersionParams.consensus_version from Te…
Browse files Browse the repository at this point in the history
…nderdash 1.3 (#101)

* chore: add consensus_version to consensus params version

* build(deps): update deprecated actions/upload-artifact v1 to v4
  • Loading branch information
lklimek committed Sep 19, 2024
1 parent 03b741f commit 5c10a1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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)
}

0 comments on commit 5c10a1b

Please sign in to comment.