Skip to content

Commit

Permalink
Merging feat-2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Zajkowski committed Oct 4, 2024
2 parents 43b8bcf + 515aac5 commit 3567921
Show file tree
Hide file tree
Showing 38 changed files with 258 additions and 432 deletions.
85 changes: 54 additions & 31 deletions Cargo.lock

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

9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@ RUSTUP = $(or $(shell which rustup), $(HOME)/.cargo/bin/rustup)
NPM = $(or $(shell which npm), /usr/bin/npm)

PINNED_NIGHTLY := $(shell cat smart_contracts/rust-toolchain)
# TODO: When `PINNED_NIGHTLY` is updated to something reletively new, we can get rid
# of this specific 'NIGHTLY_FOR_DOC' variable and use `PINNED_NIGHTLY` in `make doc` instead.
#
# At the moment, we can't use STABLE for doc, due to 'doc_auto_cfg' feature being unstable.
# We also can't use the nightly version that is pinned for the contracts, because it is too old.
NIGHTLY_FOR_DOC = nightly-2024-01-01
PINNED_STABLE := $(shell sed -nr 's/channel *= *\"(.*)\"/\1/p' rust-toolchain.toml)
WASM_STRIP_VERSION := $(shell wasm-strip --version)

CARGO_OPTS := --locked
CARGO_PINNED_NIGHTLY := $(CARGO) +$(PINNED_NIGHTLY) $(CARGO_OPTS)
CARGO_NIGHTLY_FOR_DOC := $(CARGO) +$(NIGHTLY_FOR_DOC) $(CARGO_OPTS)
CARGO := $(CARGO) $(CARGO_OPTS)

DISABLE_LOGGING = RUST_LOG=MatchesNothing
Expand Down Expand Up @@ -164,7 +157,7 @@ audit: audit-rs

.PHONY: doc
doc:
RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_NIGHTLY_FOR_DOC) doc --all-features $(CARGO_FLAGS) --no-deps
RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_PINNED_NIGHTLY) doc --all-features $(CARGO_FLAGS) --no-deps
cd smart_contracts/contract && RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_PINNED_NIGHTLY) doc --all-features $(CARGO_FLAGS) --no-deps

.PHONY: check-rs
Expand Down
3 changes: 0 additions & 3 deletions binary_port/src/response_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use core::{convert::TryFrom, fmt};

#[cfg(test)]
use rand::Rng;
#[cfg(feature = "json-schema")]
use schemars::JsonSchema;

#[cfg(test)]
use casper_types::testing::TestRng;
Expand All @@ -32,7 +30,6 @@ use crate::{
/// A type of the payload being returned in a binary response.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[repr(u8)]
#[cfg_attr(feature = "json-schema", derive(JsonSchema))]
pub enum ResponseType {
/// Legacy version of the block header.
BlockHeaderV1,
Expand Down
4 changes: 0 additions & 4 deletions binary_port/src/type_wrappers.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use core::{convert::TryFrom, num::TryFromIntError, time::Duration};
use std::collections::BTreeMap;

#[cfg(feature = "datasize")]
use datasize::DataSize;

use casper_types::{
bytesrepr::{self, Bytes, FromBytes, ToBytes},
contracts::ContractHash,
Expand Down Expand Up @@ -76,7 +73,6 @@ impl TryFrom<Uptime> for TimeDiff {

/// Type representing changes in consensus validators.
#[derive(Debug, PartialEq, Eq, Serialize)]
#[cfg_attr(feature = "datasize", derive(DataSize))]
pub struct ConsensusValidatorChanges(BTreeMap<PublicKey, Vec<(EraId, ValidatorChange)>>);

impl ConsensusValidatorChanges {
Expand Down
6 changes: 3 additions & 3 deletions execution_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ base16 = "0.2.1"
bincode = "1.3.1"
casper-storage = { version = "2.0.0", path = "../storage" }
casper-types = { version = "5.0.0", path = "../types", default-features = false, features = ["datasize", "gens", "json-schema", "std"] }
casper-wasm = { version = "0.46.0", default-features = false }
casper-wasm-utils = "3.0.0"
casper-wasmi = "0.13.2"
casper-wasm = { version = "0.46.0", default-features = false, features = ["sign_ext"] }
casper-wasm-utils = { version = "3.0.0", default-features = false, features = ["sign_ext"] }
casper-wasmi = { version = "0.14.0", features = ["sign_ext"] }
datasize = "0.2.4"
either = "1.8.1"
hex-buffer-serde = "0.2.1"
Expand Down
Loading

0 comments on commit 3567921

Please sign in to comment.