logos-co / nomos-node

Nomos blockchain node
52 stars 18 forks source link

bug: unused modified encoded_evals in the test for RS #692

Open romanzac opened 3 months ago

romanzac commented 3 months ago

Problem

I've noticed altered "encoded" variable was not used during test for RS. When I used it again, the test is failing.

Impact

Test case: occurrence high, impact low.

Expected behavior

Either to rewrite test or explain why decoding with omitted evaluation points from encoding phase produces different result.

Screenshots/logs

cargo test test_encode_decode -p kzgrs -- --nocapture
   Compiling kzgrs v0.1.0 (/Users/roman/sources/nomos-node/nomos-da/kzgrs)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 5.11s
     Running unittests src/lib.rs (/Users/roman/sources/nomos-node/target/debug/deps/kzgrs-438c96df81453003)

running 1 test
thread 'rs::test::test_encode_decode' panicked at nomos-da/kzgrs/src/rs.rs:117:9:
assertion `left == right` failed
  left: [201, 225, 113, 229, 152, 200, 134, 41, 93, 112, 155, 187, 101, 99, 119, 253, 44, 161, 242, 244, 104, 191, 57, 192, 232, 92, 192, 163, 144, 216, 245, 101, 198, 172, 40, 194, 196, 254, 125, 153, 32, 138, 180, 1, 227, 105, 228, 196, 26, 254, 126, 26, 189, 45, 22, 54, 206, 163, 178, 192, 135, 208, 181, 102, 146, 138, 32, 123, 133, 213, 222, 198, 92, 18, 215, 166, 100, 126, 192, 158, 188, 13, 164, 104, 153, 13, 176, 9, 137, 99, 216, 188, 39, 240, 69, 148, 181, 246, 18, 151, 26, 90, 117, 255, 101, 108, 235, 40, 107, 25, 166, 175, 34, 47, 252, 57, 37, 197, 198, 25, 93, 142, 181, 136, 238, 190, 249, 43, 117, 176, 0, 224, 52, 28, 211, 150, 56, 26, 222, 37, 22, 160, 106, 206, 189, 244, 131, 118, 67, 235, 20, 234, 81, 31, 201, 130, 222, 243, 202, 137, 224, 187, 153, 64, 8, 117, 37, 82, 48, 235, 250, 63, 200, 139, 116, 93, 24, 119, 127, 2, 200, 146, 181, 181, 202, 254, 74, 8, 0, 51, 209, 200, 245, 37, 168, 24, 164, 76, 98, 110, 253, 127, 131, 183, 29, 91, 102, 156, 30, 248, 225, 215, 179, 18, 162, 92, 33, 44, 98, 104, 161, 145, 193, 182, 40, 96, 187, 241, 89, 107, 152, 153, 221, 141, 118, 174, 28, 30, 199, 192, 37, 183, 4, 172, 202, 241, 184, 91, 125, 129, 6, 82, 242, 79, 38, 244, 140, 106, 100, 182, 63, 244, 35, 68, 174, 30, 84, 208, 176, 226, 29, 140, 235, 197, 52, 139, 34, 57, 220, 171, 36, 184, 208, 2, 29, 211, 170, 45, 169, 237, 106, 60, 22, 217, 209, 142, 254, 173, 48, 179, 102, 79, 83, 109, 174, 235, 171, 91, 70, 210]
 right: [201, 225, 113, 229, 152, 200, 134, 41, 93, 112, 155, 187, 101, 99, 119, 253, 44, 161, 242, 244, 104, 191, 57, 192, 232, 92, 192, 163, 144, 216, 245, 57, 85, 218, 102, 146, 180, 7, 98, 229, 38, 108, 122, 215, 6, 123, 188, 88, 98, 47, 224, 133, 188, 120, 76, 104, 93, 110, 184, 133, 87, 81, 181, 102, 146, 138, 32, 123, 133, 213, 222, 198, 92, 18, 215, 166, 100, 126, 192, 158, 188, 13, 164, 104, 153, 13, 176, 9, 137, 99, 216, 188, 39, 64, 189, 210, 39, 182, 146, 22, 20, 12, 101, 10, 234, 36, 149, 245, 251, 230, 81, 222, 97, 103, 146, 114, 38, 82, 220, 244, 8, 148, 167, 255, 238, 190, 249, 43, 117, 176, 0, 224, 52, 28, 211, 150, 56, 26, 222, 37, 22, 160, 106, 206, 189, 244, 131, 118, 67, 235, 20, 234, 81, 31, 201, 151, 219, 166, 153, 53, 162, 66, 44, 169, 1, 58, 118, 41, 200, 143, 211, 89, 249, 52, 252, 229, 95, 102, 114, 69, 239, 186, 87, 59, 187, 159, 74, 8, 0, 51, 209, 200, 245, 37, 168, 24, 164, 76, 98, 110, 253, 127, 131, 183, 29, 91, 102, 156, 30, 248, 225, 215, 179, 18, 162, 92, 33, 140, 127, 85, 191, 36, 49, 62, 110, 227, 133, 28, 103, 215, 53, 205, 214, 191, 174, 47, 142, 189, 6, 240, 67, 239, 227, 132, 221, 65, 25, 27, 125, 129, 6, 82, 242, 79, 38, 244, 140, 106, 100, 182, 63, 244, 35, 68, 174, 30, 84, 208, 176, 226, 29, 140, 235, 197, 52, 139, 34, 57, 220, 38, 112, 18, 118, 65, 129, 59, 240, 17, 225, 104, 223, 13, 37, 115, 200, 107, 109, 222, 247, 60, 205, 168, 61, 185, 68, 70, 81, 125, 195, 67]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test rs::test::test_encode_decode ... FAILED

failures:

failures:
    rs::test::test_encode_decode

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.12s

error: test failed, to rerun pass `-p kzgrs --lib`