Skip to content

Commit

Permalink
fix(verifier-alliance): bump verification-common to support invalid '…
Browse files Browse the repository at this point in the history
…compilation_artifacts.sources' values (#1216)
  • Loading branch information
rimrakhimov authored Jan 28, 2025
1 parent 8d9cf0e commit 97be784
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion eth-bytecode-db/Cargo.lock

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

2 changes: 1 addition & 1 deletion eth-bytecode-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ tonic-build = { version = "0.8" }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3" }
url = { version = "2" }
verification-common = { git = "https://github.com/blockscout/blockscout-rs", rev = "5481500" }
verification-common = { git = "https://github.com/blockscout/blockscout-rs", rev = "8d9cf0e" }
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ impl DatabaseService {
contract_address.to_vec(),
)
.await
.map_err(|err| tonic::Status::internal(err.to_string()))?
.map_err(|err| {
tracing::error!("error while retrieving alliance sources: {err:#?}");
tonic::Status::internal(err.to_string())
})?
.into_iter()
.map(|source| SourceWrapper::from(source).into_inner())
.collect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::from_json;
use blockscout_service_launcher::test_database::database;
use std::collections::BTreeMap;
use verification_common::verifier_alliance::{
CompilationArtifacts, CreationCodeArtifacts, RuntimeCodeArtifacts, SourceId,
CompilationArtifacts, CreationCodeArtifacts, RuntimeCodeArtifacts,
};
use verifier_alliance_database::{
internal, CompiledContract, CompiledContractCompiler, CompiledContractLanguage,
Expand Down Expand Up @@ -30,7 +30,7 @@ async fn insert_compiled_contract_works() {
devdoc: Some(from_json!({"devdoc": "value"})),
userdoc: Some(from_json!({"userdoc": "value"})),
storage_layout: Some(from_json!({"storage": "value"})),
sources: Some(BTreeMap::from([("src/Counter.sol".into(), SourceId {id: 0})])),
sources: Some(from_json!({"src/Counter.sol": { "id": 0 }})),
},
creation_code: vec![0x1, 0x2],
creation_code_artifacts: CreationCodeArtifacts {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use sea_orm::{prelude::Uuid, DatabaseConnection};
use std::collections::BTreeMap;
use verification_common::verifier_alliance::{
CompilationArtifacts, CreationCodeArtifacts, Match, MatchTransformation, MatchValues,
RuntimeCodeArtifacts, SourceId,
RuntimeCodeArtifacts,
};
use verifier_alliance_database::{
CompiledContract, CompiledContractCompiler, CompiledContractLanguage, InsertContractDeployment,
Expand Down Expand Up @@ -191,7 +191,7 @@ fn complete_compiled_contract() -> CompiledContract {
devdoc: Some(from_json!({"devdoc": "value"})),
userdoc: Some(from_json!({"userdoc": "value"})),
storage_layout: Some(from_json!({"storage": "value"})),
sources: Some(BTreeMap::from([("src/Counter.sol".into(), SourceId {id: 0})]))
sources: Some(from_json!({"src/Counter.sol": { "id": 0 }})),
},
creation_code: vec![0x1, 0x2],
creation_code_artifacts: CreationCodeArtifacts {
Expand Down

0 comments on commit 97be784

Please sign in to comment.