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

refacto: pass new CI #6

Merged
merged 7 commits into from
Mar 5, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
branches: [main]

concurrency:
group:
pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/rust-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
with:
path: |
target/release/deoxys
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
Expand Down
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"MD033": false,
"MD041": false,
"MD045": false,
"MD003": false,
"MD013": {
"code_blocks": false,
"line_length": 135
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ git # Deoxys Changelog

## Next release

- refactor: pass new CI
- fix(workflows): Fix deoxys CI
- feat(rpc): add_invoke_tx, add_deploy_account_tx, add_declare_tx
- feat(rpc): tx_receipt, re-execute tx
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ mc-mapping-sync = { path = "crates/client/mapping-sync" }
mc-rpc = { path = "crates/client/rpc" }
mc-rpc-core = { path = "crates/client/rpc-core" }
mc-storage = { path = "crates/client/storage" }
mc-deoxys = { path = "crates/client/deoxys" }

# Madara runtime
madara-runtime = { path = "crates/runtime" }
Expand Down
8 changes: 4 additions & 4 deletions crates/client/db/src/bonsai_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ pub struct BonsaiDb<B: BlockT> {

pub fn key_type(key: &DatabaseKey) -> KeyType {
match key {
DatabaseKey::Trie(_) => return KeyType::Trie,
DatabaseKey::Flat(_) => return KeyType::Flat,
DatabaseKey::TrieLog(_) => return KeyType::TrieLog,
DatabaseKey::Trie(_) => KeyType::Trie,
DatabaseKey::Flat(_) => KeyType::Flat,
DatabaseKey::TrieLog(_) => KeyType::TrieLog,
}
}

Expand Down Expand Up @@ -119,7 +119,7 @@ impl<B: BlockT> BonsaiDatabase for &BonsaiDb<B> {
let mut result = Vec::new();

for pair in self.db.iter_with_prefix(column, prefix_slice) {
let pair = pair.map_err(|e| BonsaiDbError::from(e))?;
let pair = pair.map_err(BonsaiDbError::from)?;
result.push((pair.0.into_vec(), pair.1));
}

Expand Down
2 changes: 2 additions & 0 deletions crates/client/db/src/db_opening_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use sp_database::Database;

use crate::{DatabaseSettings, DatabaseSource, DbHash};

#[allow(clippy::type_complexity)]
pub(crate) fn open_database(
config: &DatabaseSettings,
) -> Result<(Arc<dyn KeyValueDB>, Arc<dyn Database<DbHash>>), String> {
Expand All @@ -48,6 +49,7 @@ pub(crate) fn open_database(
Ok(dbs)
}

#[allow(clippy::type_complexity)]
pub fn open_kvdb_rocksdb(
path: &Path,
create: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/client/mapping-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ futures = { workspace = true, default-features = true }
futures-timer = "3.0.2"
log = { workspace = true, default-features = true }
mc-db = { workspace = true }
mc-sync = { workspace = true }
mc-rpc-core = { workspace = true }
mc-storage = { workspace = true }
mc-sync = { workspace = true }
mp-digest-log = { workspace = true }
mp-felt = { workspace = true }
mp-hashers = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pallet-starknet = { workspace = true, default-features = true }
pallet-starknet-runtime-api = { workspace = true, default-features = true }
# Madara client
mc-db = { workspace = true }
mc-sync = { workspace = true }
mc-rpc-core = { workspace = true }
mc-storage = { workspace = true }
mc-sync = { workspace = true }
# Substate primitives
frame-support = { workspace = true }
frame-system = { workspace = true }
Expand All @@ -43,8 +43,8 @@ sc-network-sync = { workspace = true }
blockifier = { workspace = true, default-features = true }
starknet-core = { workspace = true }
starknet-ff = { workspace = true }
starknet_api = { workspace = true, default-features = true }
starknet-providers = { workspace = true }
starknet_api = { workspace = true, default-features = true }
# Others
anyhow = { workspace = true }
hex = { workspace = true, default-features = true }
Expand Down
9 changes: 3 additions & 6 deletions crates/client/rpc/src/events/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(test)]
mod tests;

use jsonrpsee::core::RpcResult;
use log::error;
use mc_rpc_core::utils::get_block_by_block_hash;
Expand Down Expand Up @@ -74,7 +71,7 @@ where
.collect()
} else {
starknet_block
.transactions_hashes::<H>(chain_id.into(), Some(starknet_block.header().block_number))
.transactions_hashes::<H>(chain_id, Some(starknet_block.header().block_number))
.map(FieldElement::from)
.collect()
};
Expand All @@ -83,10 +80,10 @@ where
// the txs hashes are found by the index of the ordered event
let tx_hash_and_events: Vec<(Felt252Wrapper, _)> = starknet_block
.events()
.into_iter()
.iter()
.flat_map(|ordered_event| {
let tx_hash = block_txs_hashes[ordered_event.index() as usize];
ordered_event.events().into_iter().map(move |events| (tx_hash.into(), events.clone()))
ordered_event.events().iter().map(move |events| (tx_hash.into(), events.clone()))
})
.collect();

Expand Down
149 changes: 0 additions & 149 deletions crates/client/rpc/src/events/tests.rs

This file was deleted.

Loading
Loading