Skip to content

Commit

Permalink
Unskip tests, remove decoding debug logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan committed Jul 24, 2024
1 parent 710cb34 commit 8eae571
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion vm/rust/src/jsonrpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use blockifier::execution::entry_point::CallType;
use blockifier::state::cached_state::CachedState;
use blockifier::state::cached_state::{CommitmentStateDiff, TransactionalState};
use blockifier::state::errors::StateError;
use blockifier::state::state_api::{State, StateReader};
use blockifier::state::state_api::StateReader;
use cairo_vm::types::builtin_name::BuiltinName;
use serde::Serialize;
use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, EthAddress, PatriciaKey};
Expand Down
2 changes: 0 additions & 2 deletions vm/rust/src/juno_state_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ pub fn class_info_from_json_str(raw_json: &str) -> Result<BlockifierClassInfo, S
.map_err(|err| format!("failed parsing class info: {:?}", err))?;
let class_def = class_info.contract_class.to_string();

println!("JSON: {}", raw_json);
let _ = ContractClassV0::try_from_json_string(class_def.as_str()).unwrap();
let class: ContractClass =
if let Ok(class) = ContractClassV0::try_from_json_string(class_def.as_str()) {
class.into()
Expand Down
5 changes: 2 additions & 3 deletions vm/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use blockifier::blockifier::block::{
pre_process_block, BlockInfo as BlockifierBlockInfo, BlockNumberHashPair, GasPrices,
};
use blockifier::abi::constants::STORED_BLOCK_HASH_BUFFER;
use blockifier::state::global_cache::GlobalContractCache;
use blockifier::bouncer::BouncerConfig;
use blockifier::{
context::{BlockContext, ChainInfo, FeeTokenAddresses, TransactionContext},
Expand Down Expand Up @@ -318,7 +317,7 @@ pub extern "C" fn cairoVMExecute(

// we are estimating fee, override actual fee calculation
if t.transaction_receipt.fee.0 == 0 {
// t.transaction_receipt.fee = calculate_tx_fee(t.transaction_receipt.resources, &block_context, &fee_type).unwrap();
// t.transaction_receipt.fee = calculate_tx_fee(t.transaction_receipt.resources, &block_context, &fee_type).unwrap();
}

let actual_fee = t.transaction_receipt.fee.0.into();
Expand Down Expand Up @@ -479,7 +478,7 @@ fn build_block_context(
},
};

pre_process_block(state, old_block_number_and_hash, block_info.block_number.next().unwrap()).unwrap();
pre_process_block(state, old_block_number_and_hash, block_info.block_number).unwrap();
BlockContext::new(block_info, chain_info, constants, BouncerConfig::max())
}

Expand Down
6 changes: 0 additions & 6 deletions vm/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
)

func TestV0Call(t *testing.T) {
t.Skip("todo fix")

testDB := pebble.NewMemTest(t)
txn, err := testDB.NewTransaction(true)
require.NoError(t, err)
Expand Down Expand Up @@ -82,8 +80,6 @@ func TestV0Call(t *testing.T) {
}

func TestV1Call(t *testing.T) {
t.Skip("for now")

testDB := pebble.NewMemTest(t)
txn, err := testDB.NewTransaction(true)
require.NoError(t, err)
Expand Down Expand Up @@ -154,8 +150,6 @@ func TestV1Call(t *testing.T) {
}

func TestCall_MaxSteps(t *testing.T) {
t.Skip()

testDB := pebble.NewMemTest(t)
txn, err := testDB.NewTransaction(true)
require.NoError(t, err)
Expand Down

0 comments on commit 8eae571

Please sign in to comment.