Skip to content

Commit

Permalink
Merge branch 'develop' into build/deps-update
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer authored Oct 5, 2024
2 parents 222b5ce + 79b1bcc commit 3d2d494
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 9 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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ The repository contains the following crates:

## Version Compatibility

The major and minor versions of this library are designed to match those of [Tenderdash]. For instance, if you're working with `Tenderdash 1.2.34`, you should use `rs-tenderdash-abci 1.2.*` to ensure compatibility.
Versioning of this library follows the Semantic Versioning 2.0.0 specification. Specifically, it consists of
`MAJOR.MINOR.PATCH+BUILD`, where `BUILD` denotes minimum version of [Tenderdash] required.

For instance, if you're working with `Tenderdash 1.3.0`, you should use `rs-tenderdash-abci 1.2.0+1.3.0`.

This library also includes built-in support for ABCI protocol version verification. The ABCI protocol version, as defined in Tenderdash's [version.go](https://github.com/dashpay/tenderdash/blob/HEAD/version/version.go) under the `ABCISemVer` constant, must align with the ABCI protocol version of this library. You can find the library's ABCI protocol version in [proto/src/tenderdash.rs](proto/src/tenderdash.rs) under the `ABCI_VERSION` constant.

Expand Down
1 change: 1 addition & 0 deletions abci/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[package]
version = "1.2.0+1.3.0"
name = "tenderdash-abci"
edition = "2021"
license = "Apache-2.0"
Expand Down
6 changes: 2 additions & 4 deletions abci/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## tendermint-abci
# tendermint-abci

[![Crate][crate-image]][crate-link]
[![Docs][docs-image]][docs-link]
Expand Down Expand Up @@ -85,9 +85,7 @@ Copyright © 2021 Informal Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use the files in this repository except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0
You may obtain a copy of the License at <https://www.apache.org/licenses/LICENSE-2.0> .

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
1 change: 1 addition & 0 deletions proto-compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[package]
version = "1.2.0+1.3.0"
name = "tenderdash-proto-compiler"
authors = ["Informal Systems <[email protected]>", "Dash Core Group"]
edition = "2021"
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,
),
];
1 change: 1 addition & 0 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[package]
version = "1.2.0+1.3.0"
name = "tenderdash-proto"
edition = "2021"
license = "Apache-2.0"
Expand Down
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 = "v1.3.0";

// 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 @@ -157,6 +157,7 @@ pub fn test_consensus_params_serde() {
]
},
"version": {
"consensus_version": "1",
"app_version": "1"
},
"synchrony": {
Expand All @@ -176,5 +177,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)
}
24 changes: 23 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /bin/bash

set -e

PLATFORM_DIR="$(realpath "$(dirname "$0")/../../platform")"

function help() {
Expand All @@ -26,6 +28,8 @@ Examples:
EOF
}

VERBOSE=0

# Parse arguments
while [[ $# -gt 0 ]]; do
key="$1"
Expand All @@ -52,6 +56,10 @@ while [[ $# -gt 0 ]]; do
rs_tenderdash_abci_version=$1
shift
;;
-v | --verbose)
VERBOSE=1
shift
;;
*)
break
;;
Expand All @@ -61,16 +69,28 @@ done
# Check if the versions are passed.
if [ -z "$td_version" ]; then
echo "Please specify the version of Tenderdash."
echo ""
help
exit 1
fi
td_version=${td_version#v} # remove 'v' if it exists

if [ -z "$rs_tenderdash_abci_version" ]; then
echo "Please specify the version of the library."
echo ""
help
exit 1
fi

rs_tenderdash_abci_version=${rs_tenderdash_abci_version#v} # remove 'v' if it exists
if [ $VERBOSE -eq 1 ]; then
set -x
fi

rs_tenderdash_abci_version="${rs_tenderdash_abci_version#v}+${td_version}" # remove 'v' if it exists and suffix build mtd

echo "INFO: Preparing release of rs-tenderdash-abci version $rs_tenderdash_abci_version with Tenderdash version $td_version"

echo INFO: Update the version in the Cargo.toml files.

set -ex
# Update the version in the Cargo.toml files.
Expand All @@ -88,3 +108,5 @@ else
echo "WARN: Dash Platform not found in $PLATFORM_DIR, skipping"
fi
# tenderdash-proto = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "0.14.0-dev.8", features = [

echo "INFO: Done"

0 comments on commit 3d2d494

Please sign in to comment.