near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.33k stars 624 forks source link

[Epoch Sync] Add tests for epoch sync proof verification #12260

Open staffik opened 2 weeks ago

staffik commented 2 weeks ago

Description

Follow-up task to https://github.com/near/nearcore/pull/12020.

Comment: Add some tests (can add some to the testloop test) that messing with the proof will result in a failing verification. We could, e.g. check that tweaking every byte of a valid serialized proof will cause a failure one way or another. It doesn't cover all possible attacks but at least makes sure that we aren't forgetting any fields.

robin-near commented 2 weeks ago

Some things to check for: