Skip to content

Commit

Permalink
Reverting to 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sacherjj committed Dec 18, 2020
1 parent 2233b8c commit 6c6663a
Show file tree
Hide file tree
Showing 22 changed files with 204 additions and 221 deletions.
334 changes: 148 additions & 186 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions ci/casper_updater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ const DRY_RUN_ARG_NAME: &str = "dry-run";
const DRY_RUN_ARG_SHORT: &str = "d";
const DRY_RUN_ARG_HELP: &str = "Check all regexes get matches in current casper-node repo";

const ALLOW_EARLIER_VERSION_NAME: &str = "allow-earlier-version";
const ALLOW_EARLIER_VERSION_HELP: &str = "Allow manual setting of version earlier than current";

#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
pub(crate) enum BumpVersion {
Major,
Expand All @@ -82,6 +85,7 @@ struct Args {
root_dir: PathBuf,
bump_version: Option<BumpVersion>,
dry_run: bool,
allow_earlier_version: bool,
}

/// The full path to the casper-node root directory.
Expand All @@ -99,6 +103,11 @@ pub(crate) fn is_dry_run() -> bool {
ARGS.dry_run
}

/// If we allow reverting version to previous (used for master back to previous release branch)
pub(crate) fn allow_earlier_version() -> bool {
ARGS.allow_earlier_version
}

static ARGS: Lazy<Args> = Lazy::new(get_args);

fn get_args() -> Args {
Expand Down Expand Up @@ -127,6 +136,11 @@ fn get_args() -> Args {
.short(DRY_RUN_ARG_SHORT)
.help(DRY_RUN_ARG_HELP),
)
.arg(
Arg::with_name(ALLOW_EARLIER_VERSION_NAME)
.long(ALLOW_EARLIER_VERSION_NAME)
.help(ALLOW_EARLIER_VERSION_HELP),
)
.get_matches();

let root_dir = match arg_matches.value_of(ROOT_DIR_ARG_NAME) {
Expand All @@ -151,10 +165,13 @@ fn get_args() -> Args {

let dry_run = arg_matches.is_present(DRY_RUN_ARG_NAME);

let allow_earlier_version = arg_matches.is_present(ALLOW_EARLIER_VERSION_NAME);

Args {
root_dir,
bump_version,
dry_run,
allow_earlier_version,
}
}

Expand Down
6 changes: 5 additions & 1 deletion ci/casper_updater/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ impl Package {
"Updated version ({}) is lower than current version ({})",
new_version, self.current_version
);
continue;
if crate::allow_earlier_version() {
println!("Allowing earlier version due to flag.")
} else {
continue;
}
}

return if new_version == self.current_version {
Expand Down
8 changes: 4 additions & 4 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-client"
version = "0.4.0"
version = "0.3.1"
authors = ["Marc Brinkmann <[email protected]>", "Fraser Hutchison <[email protected]>"]
edition = "2018"
description = "A client for interacting with the Casper network"
Expand All @@ -22,9 +22,9 @@ doc = false

[dependencies]
base64 = "0.13.0"
casper-execution-engine = { version = "0.4.0", path = "../execution_engine" }
casper-node = { version = "0.4.0", path = "../node" }
casper-types = { version = "0.4.0", path = "../types", features = ["std"] }
casper-execution-engine = { version = "0.3.1", path = "../execution_engine" }
casper-node = { version = "0.3.1", path = "../node" }
casper-types = { version = "0.3.1", path = "../types", features = ["std"] }
clap = "2.33.1"
futures = "0.3.5"
hex = { version = "0.4.2", features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions execution_engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-execution-engine"
version = "0.4.0" # when updating, also update 'html_root_url' in lib.rs
version = "0.3.1" # when updating, also update 'html_root_url' in lib.rs
authors = ["Henry Till <[email protected]>", "Ed Hastings <[email protected]>"]
edition = "2018"
description = "CasperLabs execution engine crates."
Expand All @@ -15,7 +15,7 @@ anyhow = "1.0.33"
base16 = "0.2.1"
bincode = "1.3.1"
blake2 = "0.9.0"
casper-types = { version = "0.4.0", path = "../types", features = ["std", "gens"] }
casper-types = { version = "0.3.1", path = "../types", features = ["std", "gens"] }
chrono = "0.4.10"
datasize = "0.2.0"
csv = "1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion execution_engine/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! The engine which executes smart contracts on the Casper network.
#![doc(html_root_url = "https://docs.rs/casper-execution-engine/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-execution-engine/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down
2 changes: 1 addition & 1 deletion grpc/cargo_casper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-casper"
version = "0.4.0"
version = "0.3.1"
authors = ["Fraser Hutchison <[email protected]>"]
edition = "2018"
description = "Command line tool for creating a Wasm smart contract and tests for use on the Casper network."
Expand Down
4 changes: 2 additions & 2 deletions grpc/cargo_casper/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use once_cell::sync::Lazy;
use crate::{dependency::Dependency, ARGS, FAILURE_EXIT_CODE};

pub static CL_CONTRACT: Lazy<Dependency> =
Lazy::new(|| Dependency::new("casper-contract", "0.4.0", "smart_contracts/contract"));
Lazy::new(|| Dependency::new("casper-contract", "0.3.1", "smart_contracts/contract"));
pub static CL_TYPES: Lazy<Dependency> =
Lazy::new(|| Dependency::new("casper-types", "0.4.0", "types"));
Lazy::new(|| Dependency::new("casper-types", "0.3.1", "types"));

pub fn print_error_and_exit(msg: &str) -> ! {
e_red!("error");
Expand Down
2 changes: 1 addition & 1 deletion grpc/cargo_casper/src/tests_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static INTEGRATION_TESTS_RS: Lazy<PathBuf> = Lazy::new(|| {
.join("src/integration_tests.rs")
});
static ENGINE_TEST_SUPPORT: Lazy<Dependency> =
Lazy::new(|| Dependency::new("casper-engine-test-support", "0.4.0", "grpc/test_support"));
Lazy::new(|| Dependency::new("casper-engine-test-support", "0.3.1", "grpc/test_support"));
static CARGO_TOML_ADDITIONAL_CONTENTS: Lazy<String> = Lazy::new(|| {
format!(
r#"
Expand Down
6 changes: 3 additions & 3 deletions grpc/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-engine-grpc-server"
version = "0.4.0"
version = "0.3.1"
authors = ["Mateusz Górski <[email protected]>"]
edition = "2018"
description = "Wasm execution engine for Casper smart contracts."
Expand All @@ -19,8 +19,8 @@ include = [
]

[dependencies]
casper-execution-engine = { version = "0.4.0", path = "../../execution_engine", features = ["gens"] }
casper-types = { version = "0.4.0", path = "../../types", features = ["std", "gens"] }
casper-execution-engine = { version = "0.3.1", path = "../../execution_engine", features = ["gens"] }
casper-types = { version = "0.3.1", path = "../../types", features = ["std", "gens"] }
clap = "2"
ctrlc = "3"
dirs = "3"
Expand Down
10 changes: 5 additions & 5 deletions grpc/test_support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-engine-test-support"
version = "0.4.0" # when updating, also update 'html_root_url' in lib.rs
version = "0.3.1" # when updating, also update 'html_root_url' in lib.rs
authors = ["Fraser Hutchison <[email protected]>"]
edition = "2018"
description = "Library to support testing of Wasm smart contracts for use on the Casper network."
Expand All @@ -11,10 +11,10 @@ repository = "https://github.com/CasperLabs/casper-node/tree/master/grpc/test_su
license-file = "../../LICENSE"

[dependencies]
casper-contract = { version = "0.4.0", path = "../../smart_contracts/contract", features = ["std"] }
casper-engine-grpc-server = { version = "0.4.0", path = "../server" }
casper-execution-engine = { version = "0.4.0", path = "../../execution_engine" }
casper-types = { version = "0.4.0", path = "../../types", features = ["std"] }
casper-contract = { version = "0.3.1", path = "../../smart_contracts/contract", features = ["std"] }
casper-engine-grpc-server = { version = "0.3.1", path = "../server" }
casper-execution-engine = { version = "0.3.1", path = "../../execution_engine" }
casper-types = { version = "0.3.1", path = "../../types", features = ["std"] }
grpc = "0.6.1"
lmdb = "0.8.0"
log = "0.4.8"
Expand Down
2 changes: 1 addition & 1 deletion grpc/test_support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
//! assert_eq!(expected_value, returned_value);
//! ```
#![doc(html_root_url = "https://docs.rs/casper-engine-test-support/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-engine-test-support/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down
8 changes: 4 additions & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-node"
version = "0.4.0" # when updating, also update 'html_root_url' in lib.rs
version = "0.3.1" # when updating, also update 'html_root_url' in lib.rs
authors = ["Marc Brinkmann <[email protected]>", "Fraser Hutchison <[email protected]>"]
edition = "2018"
description = "The Casper blockchain node"
Expand All @@ -19,9 +19,9 @@ base16 = "0.2.1"
base64 = "0.13.0"
bincode = "1.3.1"
blake2 = { version = "0.9.0", default-features = false }
casper-execution-engine = { version = "0.4.0", path = "../execution_engine" }
casper-node-macros = { version = "0.4.0", path = "../node_macros" }
casper-types = { version = "0.4.0", path = "../types", features = ["std", "gens"] }
casper-execution-engine = { version = "0.3.1", path = "../execution_engine" }
casper-node-macros = { version = "0.3.1", path = "../node_macros" }
casper-types = { version = "0.3.1", path = "../types", features = ["std", "gens"] }
chrono = "0.4.10"
csv = "1.1.3"
datasize = { version = "0.2.3", features = ["fake_clock-types", "futures-types", "smallvec-types", "tokio-types"] }
Expand Down
2 changes: 1 addition & 1 deletion node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! While the [`main`](fn.main.html) function is the central entrypoint for the node application,
//! its core event loop is found inside the [reactor](reactor/index.html).
#![doc(html_root_url = "https://docs.rs/casper-node/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-node/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down
2 changes: 1 addition & 1 deletion node_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-node-macros"
version = "0.4.0"
version = "0.3.1"
authors = ["Marc Brinkmann <[email protected]>"]
edition = "2018"
description = "A macro to create reactor implementations for the casper-node."
Expand Down
2 changes: 1 addition & 1 deletion node_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Generates reactors with routing from concise definitions. See `README.md` for details.
#![doc(html_root_url = "https://docs.rs/casper-node-macros/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-node-macros/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down
4 changes: 2 additions & 2 deletions smart_contracts/contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-contract"
version = "0.4.0" # when updating, also update 'html_root_url' in lib.rs
version = "0.3.1" # when updating, also update 'html_root_url' in lib.rs
authors = ["Michael Birch <[email protected]>", "Mateusz Górski <[email protected]>"]
edition = "2018"
description = "Library for developing Casper smart contracts."
Expand All @@ -11,7 +11,7 @@ repository = "https://github.com/CasperLabs/casper-node/tree/master/smart_contra
license-file = "../../LICENSE"

[dependencies]
casper-types = { version = "0.4.0", path = "../../types" }
casper-types = { version = "0.3.1", path = "../../types" }
hex_fmt = "0.3.0"
thiserror = "1.0.18"
version-sync = { version = "0.9", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion smart_contracts/contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
not(feature = "std"),
feature(alloc_error_handler, core_intrinsics, lang_items)
)]
#![doc(html_root_url = "https://docs.rs/casper-contract/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-contract/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down
2 changes: 1 addition & 1 deletion smart_contracts/contract_as/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion smart_contracts/contract_as/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@casper/contract",
"version": "0.4.0",
"version": "0.3.1",
"description": "Library for developing Casper smart contracts.",
"main": "index.js",
"ascMain": "assembly/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casper-types"
version = "0.4.0" # when updating, also update 'html_root_url' in lib.rs
version = "0.3.1" # when updating, also update 'html_root_url' in lib.rs
authors = ["Fraser Hutchison <[email protected]>"]
edition = "2018"
description = "Types used to allow creation of Wasm contracts and tests for use on the Casper network."
Expand Down
2 changes: 1 addition & 1 deletion types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
not(feature = "no-unstable-features"),
feature(min_specialization, try_reserve)
)]
#![doc(html_root_url = "https://docs.rs/casper-types/0.4.0")]
#![doc(html_root_url = "https://docs.rs/casper-types/0.3.1")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Favicon_RGB_50px.png",
html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png",
Expand Down

0 comments on commit 6c6663a

Please sign in to comment.