nervosnetwork / fiber

15 stars 8 forks source link

XUDT empty witness args should not be part of the commitment lock witness hashing #129

Closed contrun closed 2 months ago

contrun commented 2 months ago

The contract does not consider XUDT empty witness args while hashing witness.

https://github.com/nervosnetwork/cfn-scripts/blob/701d8c8a08790dd61c64f695aaa5fbed22e4b8ad/contracts/commitment-lock/src/main.rs#L149-L157

While the node code base included the empty witness args before hashing witness

https://github.com/nervosnetwork/cfn-node/blob/ce4e77579a4ddb53b08c1899fd4d0c9f658bff08/src/ckb/channel.rs#L3843-L3845

(The witness built from above already contains empty witness).

contrun commented 2 months ago

Closed with #133