Skip to content

Commit 04d8f16

Browse files
committed
remove unused stuff
1 parent 153df69 commit 04d8f16

File tree

13 files changed

+27
-98
lines changed

13 files changed

+27
-98
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/executor/benches/execution.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ fn blockifier(
4343
// convert to blockifier block context
4444
let block_context = block_context_from_envs(chain_spec, block_envs, None);
4545

46-
// group.bench_function("Blockifier.Cold", |b| {
47-
// // we need to set up the cached state for each iteration as it's not cloneable
48-
// b.iter_batched(
49-
// || {
50-
// // setup state
51-
// let state = provider.latest().expect("failed to get latest state");
52-
// let state = CachedState::new(StateProviderDb::new(state));
46+
group.bench_function("Blockifier.Cold", |b| {
47+
// we need to set up the cached state for each iteration as it's not cloneable
48+
b.iter_batched(
49+
|| {
50+
// setup state
51+
let state = provider.latest().expect("failed to get latest state");
52+
let state = CachedState::new(StateProviderDb::new(state));
5353

54-
// (state, &block_context, execution_flags, tx.clone())
55-
// },
56-
// |(mut state, block_context, flags, tx)| {
57-
// transact(&mut state, block_context, flags, tx, None)
58-
// },
59-
// BatchSize::SmallInput,
60-
// )
61-
// });
54+
(state, &block_context, execution_flags, tx.clone())
55+
},
56+
|(mut state, block_context, flags, tx)| {
57+
transact(&mut state, block_context, flags, tx, None)
58+
},
59+
BatchSize::SmallInput,
60+
)
61+
});
6262
}
6363

6464
criterion_group! {

crates/executor/tests/executor.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ fn test_executor_with_valid_blocks_impl(
9292
.unwrap()
9393
.expect("storage should exist");
9494

95-
// assert!(
96-
// updated_main_acc_balance < Felt::from(DEFAULT_PREFUNDED_ACCOUNT_BALANCE),
97-
// "sender balance should decrease"
98-
// );
99-
// assert_eq!(actual_new_acc_balance, felt!("0x9999999999999999"), "account balance is
100-
// updated");
95+
assert!(
96+
updated_main_acc_balance < Felt::from(DEFAULT_PREFUNDED_ACCOUNT_BALANCE),
97+
"sender balance should decrease"
98+
);
99+
assert_eq!(actual_new_acc_balance, felt!("0x9999999999999999"), "account balance is updated");
101100

102101
// assert that the sierra class is declared
103102
let expected_class_hash = felt!("0x420");
@@ -161,10 +160,10 @@ fn test_executor_with_valid_blocks_impl(
161160
.unwrap()
162161
.expect("storage should exist");
163162

164-
// assert!(
165-
// updated_new_acc_balance < felt!("0x9999999999999999"),
166-
// "account balance should be updated"
167-
// );
163+
assert!(
164+
updated_new_acc_balance < felt!("0x9999999999999999"),
165+
"account balance should be updated"
166+
);
168167

169168
// block 3
170169
//

crates/gateway/gateway-client/src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,6 @@ impl Client {
196196
}
197197
}
198198

199-
// unknown format:
200-
// <html><head>
201-
// <meta http-equiv="content-type" content="text/html;charset=utf-8">
202-
// <title>502 Server Error</title>
203-
// </head>
204-
// <body text=#000000 bgcolor=#ffffff>
205-
// <h1>Error: Server Error</h1>
206-
// <h2>The server encountered a temporary error and could not complete your request.<p>Please try
207-
// again in 30 seconds.</h2> <h2></h2>
208-
// </body></html>
209-
210199
#[derive(Debug, thiserror::Error)]
211200
pub enum Error {
212201
#[error(transparent)]

crates/node/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ katana-tasks.workspace = true
3030

3131
anyhow.workspace = true
3232
starknet.workspace = true
33-
num-traits.workspace = true
3433
futures.workspace = true
3534
http.workspace = true
3635
jsonrpsee.workspace = true

crates/rpc/rpc-server/src/starknet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use katana_pool::TransactionPool;
1212
use katana_primitives::block::{BlockHashOrNumber, BlockIdOrTag, FinalityStatus, GasPrices};
1313
use katana_primitives::class::{ClassHash, CompiledClass};
1414
use katana_primitives::contract::{ContractAddress, Nonce, StorageKey, StorageValue};
15-
use katana_primitives::env::{BlockEnv, VersionedConstantsOverrides};
15+
use katana_primitives::env::BlockEnv;
1616
use katana_primitives::event::MaybeForkedContinuationToken;
1717
use katana_primitives::transaction::{ExecutableTxWithHash, TxHash, TxNumber};
1818
use katana_primitives::Felt;

crates/storage/provider/provider-api/src/state_update.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ pub trait StateUpdateProvider: Send + Sync {
1818
block_id: BlockHashOrNumber,
1919
) -> ProviderResult<Option<BTreeMap<ClassHash, CompiledClassHash>>>;
2020

21-
/// Returns all declared deprecated class hashes at the given block.
22-
fn declared_deprecated_classes(
23-
&self,
24-
block_id: BlockHashOrNumber,
25-
) -> ProviderResult<Option<Vec<ClassHash>>>;
26-
2721
/// Returns all deployed contracts at the given block.
2822
fn deployed_contracts(
2923
&self,

crates/storage/provider/provider/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,6 @@ where
285285
self.provider.declared_classes(block_id)
286286
}
287287

288-
fn declared_deprecated_classes(
289-
&self,
290-
block_id: BlockHashOrNumber,
291-
) -> ProviderResult<Option<Vec<ClassHash>>> {
292-
self.provider.declared_deprecated_classes(block_id)
293-
}
294-
295288
fn deployed_contracts(
296289
&self,
297290
block_id: BlockHashOrNumber,

crates/storage/provider/provider/src/providers/db/mod.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -409,34 +409,6 @@ impl<Db: Database> StateUpdateProvider for DbProvider<Db> {
409409
}
410410
}
411411

412-
fn declared_deprecated_classes(
413-
&self,
414-
block_id: BlockHashOrNumber,
415-
) -> ProviderResult<Option<Vec<ClassHash>>> {
416-
let db_tx = self.0.tx()?;
417-
let block_num = self.block_number_by_id(block_id)?;
418-
419-
if let Some(block_num) = block_num {
420-
let declared_classes = dup_entries::<Db, tables::ClassDeclarations, Vec<ClassHash>, _>(
421-
&db_tx,
422-
block_num,
423-
|entry| {
424-
let (_, class_hash) = entry?;
425-
if db_tx.get::<tables::CompiledClassHashes>(class_hash)?.is_none() {
426-
Ok(Some(class_hash))
427-
} else {
428-
Ok(None)
429-
}
430-
},
431-
)?;
432-
433-
db_tx.commit()?;
434-
Ok(Some(declared_classes))
435-
} else {
436-
Ok(None)
437-
}
438-
}
439-
440412
fn deployed_contracts(
441413
&self,
442414
block_id: BlockHashOrNumber,

crates/storage/provider/provider/src/providers/fork/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,6 @@ impl<Db: Database> StateUpdateProvider for ForkedProvider<Db> {
135135
self.provider.declared_classes(block_id)
136136
}
137137

138-
fn declared_deprecated_classes(
139-
&self,
140-
block_id: BlockHashOrNumber,
141-
) -> ProviderResult<Option<Vec<ClassHash>>> {
142-
self.provider.declared_deprecated_classes(block_id)
143-
}
144-
145138
fn deployed_contracts(
146139
&self,
147140
block_id: BlockHashOrNumber,

0 commit comments

Comments
 (0)