-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(verification-common): implement transformation functions (#1157)
* feat(verification-common): add convenience functions to verify creation and runtime code * feat(verification-common): add cbor_auxdata handling * feat(verification-common): add immutable_references handling * feat(verification-common): add libraries handling * test(verification-common): add test cases for constructor arguments handling * refactor(verification-common): update mod orders
- Loading branch information
1 parent
7975894
commit 5481500
Showing
8 changed files
with
777 additions
and
33 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
libs/verification-common/src/verifier_alliance/code_artifact_types.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::BTreeMap; | ||
|
||
#[serde_with::serde_as] | ||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] | ||
pub struct CborAuxdataValue { | ||
#[serde_as(as = "blockscout_display_bytes::serde_as::Hex")] | ||
pub value: Vec<u8>, | ||
pub offset: u32, | ||
} | ||
pub type CborAuxdata = BTreeMap<String, CborAuxdataValue>; | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] | ||
pub struct Offset { | ||
pub start: u32, | ||
pub length: u32, | ||
} | ||
pub type Offsets = Vec<Offset>; | ||
|
||
pub type ImmutableReferences = BTreeMap<String, Offsets>; | ||
|
||
pub type LinkReferences = BTreeMap<String, BTreeMap<String, Offsets>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
mod code_artifact_types; | ||
mod compilation_artifacts; | ||
mod creation_code_artifacts; | ||
mod runtime_code_artifacts; | ||
mod verification_match; | ||
|
||
mod verification_match_transformations; | ||
mod verification_match_values; | ||
|
||
pub use code_artifact_types::{ | ||
CborAuxdata, CborAuxdataValue, ImmutableReferences, LinkReferences, Offset, Offsets, | ||
}; | ||
pub use compilation_artifacts::{CompilationArtifacts, SourceId, ToCompilationArtifacts}; | ||
pub use creation_code_artifacts::{CreationCodeArtifacts, ToCreationCodeArtifacts}; | ||
pub use runtime_code_artifacts::{RuntimeCodeArtifacts, ToRuntimeCodeArtifacts}; | ||
pub use verification_match::{Match, MatchBuilder, MatchTransformation, MatchValues}; | ||
pub use verification_match::{ | ||
verify_creation_code, verify_runtime_code, Match, MatchBuilder, MatchTransformation, | ||
MatchValues, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod verifier_alliance_matches; |
Oops, something went wrong.