tangle-network / dkg-substrate

Multy-party threshold ECDSA (GG20) Substrate node
https://tangle.webb.tools/
GNU General Public License v3.0
60 stars 15 forks source link

[BUG] acknowledge_proposal never checks data correctness #643

Closed akorchyn closed 1 year ago

akorchyn commented 1 year ago

Describe the bug Basically, the issue happens cause acknowledge_proposals doesn't check the given prop data. It's possible to make a proposal that is not related to the whitelisted chain or resource id.

To Reproduce Steps to reproduce the behavior:

  1. Go to the extrinsic tab.
  2. dkg_proposals.acknowledge_proposal
  3. Put valid ResourceId and TypedChainId arguments
  4. Put invalid data into the prop argument.

Expected behavior Probably, an error or a slash.

Screenshots image image image

EVM(1) is whitelisted beforehand.

Environment (please complete the following information):

akorchyn commented 1 year ago

I still would be able to propagate invalid resourceId or nonce by data. Fix checks only typed chain id

akorchyn commented 1 year ago

We have the same data twice in arguments and in data. Maybe there is sense to avoid data duplication? It would be easier to check