nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.14k stars 224 forks source link

[IGNORE] Revert "chore: upgrade deps" #4490

Closed chenyukang closed 3 weeks ago

chenyukang commented 3 weeks ago

Bug reproduce

chenyukang commented 3 weeks ago

We sync up develop branch with new spawn and find CI becomes failing now: https://github.com/nervosnetwork/ckb/pull/4380.

So I tried to find out the root cause. I bisect find this PR https://github.com/nervosnetwork/ckb/pull/4482 introduced the assertion failure.

We can reproduce this issue following this steps, create two branches cycle-diff-cur and cycle-diff are both same with develop, only add some new assertions:

https://github.com/nervosnetwork/ckb/compare/develop...cycle-diff-cur

In directory script, run this test will trigger assertion crash in both branches: cargo test check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk

  script git:(cycle-diff-cur) cargo test check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk 
    Finished test [unoptimized + debuginfo] target(s) in 0.50s
     Running unittests src/lib.rs (/Users/yukang/code/ckb/target/debug/deps/ckb_script-9cecea33cbfc017e)

running 3 tests
test verify::tests::ckb_2019::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk ... ok
test verify::tests::ckb_2023::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk ... FAILED
test verify::tests::ckb_2021::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk ... FAILED

failures:

---- verify::tests::ckb_2023::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk stdout ----
thread 'verify::tests::ckb_2023::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk' panicked at script/src/verify/tests/ckb_latest/features_since_v2021.rs:774:9:
assertion `left == right` failed
  left: 3225879
 right: 3276322

---- verify::tests::ckb_2021::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk stdout ----
thread 'verify::tests::ckb_2021::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk' panicked at script/src/verify/tests/ckb_latest/features_since_v2021.rs:772:9:
assertion `left == right` failed
  left: 3334802
 right: 3387236
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    verify::tests::ckb_2021::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk
    verify::tests::ckb_2023::features_since_v2021::check_typical_secp256k1_blake160_2_in_2_out_tx_with_chunk

test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured; 345 filtered out; finished in 0.99s

Then, I made this new PR to revert #4482 and merge into cycle-diff, the assertion is OK now on cycle-diff.

Which means #4482 will introduce some unexpected cycles changes.