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

Execution engine changelog #5046

Merged
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
1,325 changes: 659 additions & 666 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions binary_port/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ bytes = "1.0.1"
casper-types = { version = "5.0.0", path = "../types", features = ["datasize", "json-schema", "std"] }
once_cell = { version = "1.5.2" }
rand = "0.8.3"
schemars = { version = "0.8.16", features = ["preserve_order", "impl_json_schema"] }
serde = { version = "1.0.183", features = ["derive"] }
serde-map-to-array = "1.1.0"
strum = "0.26.2"
strum_macros = "0.26.4"
thiserror = "1.0.45"
Expand Down
3 changes: 1 addition & 2 deletions binary_port/src/minimal_block_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ use serde::{Deserialize, Serialize};

#[cfg(test)]
use rand::Rng;
use schemars::JsonSchema;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my mind introducing schemars to binary_port is overkill just to save a few lines of code in sidecar so I removed it


#[cfg(test)]
use casper_types::testing::TestRng;

/// Minimal info about a `Block` needed to satisfy the node status request.
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct MinimalBlockInfo {
hash: BlockHash,
Expand Down
3 changes: 1 addition & 2 deletions binary_port/src/speculative_execution_result.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use once_cell::sync::Lazy;
#[cfg(any(feature = "testing", test))]
use rand::Rng;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[cfg(any(feature = "testing", test))]
Expand All @@ -28,7 +27,7 @@ static SPECULATIVE_EXECUTION_RESULT: Lazy<SpeculativeExecutionResult> = Lazy::ne
)
});

#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize, JsonSchema)]
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub struct SpeculativeExecutionResult {
/// Block hash against which the execution was performed.
block_hash: BlockHash,
Expand Down
333 changes: 332 additions & 1 deletion execution_engine/CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion smart_contracts/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ cfg-if = "1.0.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rand = "0.8.5"
once_cell = "1.19.0"
linkme = "0.3.26"
#Had to solidify linkme in this version because there is an
# issue with how 0.3.31 worked with clippy of 1.77.2 rust (manifested on `make doc` script).
# This should be retested once we bump the rust version.
linkme = "=0.3.29"

[features]
default = ["std"]
Expand Down
14 changes: 9 additions & 5 deletions types/src/stored_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ impl StoredValue {
StoredValue::AddressableEntity(_) => "AddressableEntity".to_string(),
StoredValue::BidKind(_) => "BidKind".to_string(),
StoredValue::ByteCode(_) => "ByteCode".to_string(),
StoredValue::SmartContract(_) => "Package".to_string(),
StoredValue::SmartContract(_) => "SmartContract".to_string(),
StoredValue::MessageTopic(_) => "MessageTopic".to_string(),
StoredValue::Message(_) => "Message".to_string(),
StoredValue::NamedKey(_) => "NamedKey".to_string(),
Expand Down Expand Up @@ -904,7 +904,7 @@ mod serde_helpers {
Unbonding(&'a Vec<UnbondingPurse>),
AddressableEntity(&'a AddressableEntity),
BidKind(&'a BidKind),
Package(&'a Package),
SmartContract(&'a Package),
ByteCode(&'a ByteCode),
MessageTopic(&'a MessageTopicSummary),
Message(&'a MessageChecksum),
Expand All @@ -930,7 +930,7 @@ mod serde_helpers {
Unbonding(Vec<UnbondingPurse>),
AddressableEntity(AddressableEntity),
BidKind(BidKind),
Package(Package),
SmartContract(Package),
ByteCode(ByteCode),
MessageTopic(MessageTopicSummary),
Message(MessageChecksum),
Expand Down Expand Up @@ -960,7 +960,9 @@ mod serde_helpers {
HumanReadableSerHelper::AddressableEntity(payload)
}
StoredValue::BidKind(payload) => HumanReadableSerHelper::BidKind(payload),
StoredValue::SmartContract(payload) => HumanReadableSerHelper::Package(payload),
StoredValue::SmartContract(payload) => {
HumanReadableSerHelper::SmartContract(payload)
}
StoredValue::ByteCode(payload) => HumanReadableSerHelper::ByteCode(payload),
StoredValue::MessageTopic(message_topic_summary) => {
HumanReadableSerHelper::MessageTopic(message_topic_summary)
Expand Down Expand Up @@ -1001,7 +1003,9 @@ mod serde_helpers {
}
HumanReadableDeserHelper::BidKind(payload) => StoredValue::BidKind(payload),
HumanReadableDeserHelper::ByteCode(payload) => StoredValue::ByteCode(payload),
HumanReadableDeserHelper::Package(payload) => StoredValue::SmartContract(payload),
HumanReadableDeserHelper::SmartContract(payload) => {
StoredValue::SmartContract(payload)
}
HumanReadableDeserHelper::MessageTopic(message_topic_summary) => {
StoredValue::MessageTopic(message_topic_summary)
}
Expand Down
2 changes: 1 addition & 1 deletion utils/validation/src/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ pub fn make_abi_test_fixtures() -> Result<TestFixtures, Error> {
);

stored_value.insert(
"Package".to_string(),
"SmartContract".to_string(),
ABITestCase::from_inputs(vec![StoredValue::SmartContract(package).into()])?,
);

Expand Down
4 changes: 2 additions & 2 deletions utils/validation/tests/fixtures/ABI/stored_value.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@
],
"output": "052c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c64646464646464646464646464646464646464646464646464646464646464640165656565656565656565656565656565656565656565656565656565656565650a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a020b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b020500d6117e030400f90295010100000000000000"
},
"Package": {
"SmartContract": {
"input": [
{
"type": "StoredValue",
"value": {
"Package": {
"SmartContract": {
"versions": [
{
"entity_version_key": {
Expand Down
Loading