diff --git a/src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs b/src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs index ba755635f6..8a14d125d0 100644 --- a/src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs +++ b/src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs @@ -58,35 +58,14 @@ impl SpendingCounterIncreasing { /// an error reported. /// /// If the counter match succesfully, then the counter at this lane is incremented by one. - pub fn next_verify(&mut self, counter: SpendingCounter) -> Result<(), Error> { - let actual_counter = self.nexts[counter.lane()]; - - if actual_counter != counter { - Err(Error::SpendingCredentialInvalid { - expected: actual_counter, - actual: counter, - }) - } else { - self.next_unchecked(counter); - Ok(()) - } + pub fn next_verify(&mut self, _counter: SpendingCounter) -> Result<(), Error> { + // spending counter logic has been removed throughout, returning OK is the least invasive action at the moment. + // Prod chain-libs = https://github.com/input-output-hk/chain-libs/tree/catalyst-fund9-gold + Ok(()) } /// Increases the spending counter on the given lane. - pub(crate) fn next_unchecked(&mut self, unchecked_counter: SpendingCounter) { - let lane = unchecked_counter.lane(); - let counter_to_update = self.nexts[lane]; - if counter_to_update != unchecked_counter { - tracing::warn!( - "Invalid spending counter, {}", - Error::SpendingCredentialInvalid { - expected: counter_to_update, - actual: unchecked_counter, - } - ); - } - self.nexts[lane] = counter_to_update.increment(); - } + pub(crate) fn next_unchecked(&mut self, _unchecked_counter: SpendingCounter) {} } // only used to print the account's ledger @@ -204,12 +183,14 @@ mod tests { use quickcheck::TestResult; #[quickcheck_macros::quickcheck] + #[ignore] fn spending_counter_serialization_bijection(sc: SpendingCounter) -> TestResult { let bytes = sc.to_bytes(); TestResult::from_bool(SpendingCounter::from_bytes(bytes) == sc) } #[test] + #[ignore] fn new_invalid_spending_counter() { let lane: usize = (1 << LANES_BITS) + 1; let counter: u32 = 1 << UNLANES_BITS; @@ -217,6 +198,7 @@ mod tests { } #[quickcheck_macros::quickcheck] + #[ignore] fn new_spending_counter(mut lane: usize, mut counter: u32) { lane %= 1 << LANES_BITS; counter %= 1 << UNLANES_BITS; @@ -227,6 +209,7 @@ mod tests { } #[quickcheck_macros::quickcheck] + #[ignore] fn increment_counter(mut spending_counter: SpendingCounter) -> TestResult { if spending_counter.unlaned_counter().checked_add(1).is_none() { return TestResult::discard(); @@ -239,6 +222,7 @@ mod tests { } #[quickcheck_macros::quickcheck] + #[ignore] pub fn increment_nth(mut spending_counter: SpendingCounter, n: u32) -> TestResult { if spending_counter.unlaned_counter().checked_add(n).is_none() { return TestResult::discard(); @@ -252,18 +236,21 @@ mod tests { #[test] #[should_panic] + #[ignore] #[cfg(debug_assertions)] fn increment_counter_overflow_debug() { let _ = SpendingCounter::new(8, u32::MAX).unwrap().increment(); } #[test] + #[ignore] #[should_panic] #[cfg(debug_assertions)] pub fn increment_nth_overflow_debug() { let _ = SpendingCounter::new(0, 1).unwrap().increment_nth(u32::MAX); } + #[ignore] #[quickcheck_macros::quickcheck] pub fn spending_counter_is_set_on_correct_lane( spending_counter: SpendingCounter, @@ -275,6 +262,7 @@ mod tests { } #[test] + #[ignore] pub fn spending_counters_duplication() { let counters = [ SpendingCounter::zero(), @@ -290,6 +278,7 @@ mod tests { } #[test] + #[ignore] pub fn spending_counters_incorrect_order() { let counters = [ SpendingCounter::new(1, 0).unwrap(), @@ -304,6 +293,7 @@ mod tests { assert!(SpendingCounterIncreasing::new_from_counters(counters).is_err()); } + #[ignore] #[quickcheck_macros::quickcheck] pub fn spending_counter_increasing_increment(mut index: usize) -> TestResult { let mut sc_increasing = SpendingCounterIncreasing::default(); @@ -316,12 +306,14 @@ mod tests { } #[test] + #[ignore] pub fn spending_counter_increasing_wrong_counter() { let mut sc_increasing = SpendingCounterIncreasing::default(); let incorrect_sc = SpendingCounter::new(0, 100).unwrap(); assert!(sc_increasing.next_verify(incorrect_sc).is_err()); } + #[ignore] #[test] pub fn spending_counter_increasing_wrong_lane() { let mut sc_increasing = SpendingCounterIncreasing::default(); diff --git a/src/chain-libs/chain-impl-mockchain/src/ledger/ledger.rs b/src/chain-libs/chain-impl-mockchain/src/ledger/ledger.rs index bf11df7946..495de58f4a 100644 --- a/src/chain-libs/chain-impl-mockchain/src/ledger/ledger.rs +++ b/src/chain-libs/chain-impl-mockchain/src/ledger/ledger.rs @@ -2885,6 +2885,7 @@ mod tests { .is_err()); } + #[ignore] #[test] fn test_internal_apply_transaction_wrong_spending_counter() { let faucet = diff --git a/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs b/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs index bba46e81af..017c4b1d91 100644 --- a/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs +++ b/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs @@ -97,6 +97,7 @@ pub fn transaction_nonexisting_account_input() { } #[test] +#[ignore] pub fn transaction_with_incorrect_account_spending_counter() { let faucet = AddressDataValue::account_with_spending_counter(Discrimination::Test, 1, Value(1000)); diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/e2e/mod.rs b/src/chain-libs/chain-impl-mockchain/src/testing/e2e/mod.rs index efba1af8c7..1d413a0503 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/e2e/mod.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/e2e/mod.rs @@ -4,7 +4,6 @@ pub mod mint_token; pub mod owner_delegation; pub mod pool_update; pub mod rewards; -pub mod spending_counter_lanes; pub mod stake_distribution; pub mod transactions; pub mod update_proposal; diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v0.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v0.rs index 315b2689ce..754d7b1499 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v0.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v0.rs @@ -283,6 +283,7 @@ pub fn test_mempool_log_max_entries_equals_0() { .unwrap(); } +#[ignore] #[test] pub fn test_mempool_pool_max_entries_overrides_log_max_entries() { let temp_dir = TempDir::new().unwrap(); diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v1.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v1.rs index 4b7b2e4048..8564e1691a 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v1.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/bft/mempool/v1.rs @@ -351,6 +351,7 @@ pub fn test_mempool_log_max_entries_equals_0() { .unwrap(); } +#[ignore] #[test] pub fn test_mempool_pool_max_entries_overrides_log_max_entries() { let temp_dir = TempDir::new().unwrap(); diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/transaction.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/transaction.rs index abfb447e15..e400ea196e 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/transaction.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/transaction.rs @@ -12,6 +12,7 @@ use jortestkit::process::Wait; use std::time::Duration; use thor::TransactionHash; +#[ignore] #[test] pub fn explorer_transaction_test() { let jcli: JCli = Default::default(); diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/vote_plan.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/vote_plan.rs index eb8ef2ee40..a5b37782c8 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/vote_plan.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/vote_plan.rs @@ -1020,6 +1020,7 @@ pub fn explorer_all_vote_plans_public_flow_test() { ); } +#[ignore] #[test] pub fn explorer_all_vote_plans_private_flow_test() { let temp_dir = TempDir::new().unwrap().into_persistent(); diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs index ebef456328..c1993b39c5 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs @@ -104,6 +104,7 @@ pub fn dump_send_correct_fragments() { assert_all_fragment_are_persisted(dump_folder.path(), persistent_log_path.path()); } +#[ignore] #[test] pub fn dump_send_invalid_fragments() { let temp_dir = TempDir::new().unwrap(); @@ -258,6 +259,7 @@ pub fn fragment_which_reached_mempool_should_be_persisted() { assert_all_fragment_are_persisted(dump_folder.path(), persistent_log_path.path()); } +#[ignore] #[test] pub fn fragment_which_is_not_in_fragment_log_should_be_persisted() { let temp_dir = TempDir::new().unwrap(); @@ -351,6 +353,7 @@ pub fn pending_fragment_should_be_persisted() { assert!(fragment_logs.values().next().unwrap().is_pending()); } +#[ignore] #[test] pub fn node_should_pickup_log_after_restart() { let mut temp_dir = TempDir::new().unwrap();