futureversecom / trn-seed

Implementation of The Root Network node in Rust, based on the Substrate framework.

Home Page:https://www.therootnetwork.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ethy_getEventProof` RPC call returns `null` for id 890

surangap opened this issue Β· comments

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ethy_getEventProof", "params": [890]}' https://porcini.rootnet.app
{
  "args": {
    "eventProofId": "890",
    "signingRequest": {
      "value": {
        "source": "0x6d6f646c65746879627264670000000000000000",
        "message": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000097000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000aa6f739eb08edfcd4ccd061cdd3a63bb43674d2800000000000000000000000025451a4de12dccc2d166922fa938e900fcc4ed24000000000000000000000000362855f7c9c5c9d00a84157cdefe889fea4367410000000000000000000000004bb32a4263e369acbb6c020ffa89a41fd97228940000000000000000000000005630a480727cd7799073b36472d9b1a6031f840b000000000000000000000000befe11ecd579300e5ddd9528fddc91b38deaa42d000000000000000000000000d7b44643405765027e9d1c135120fb0e8904c062000000000000000000000000cdf3e0037585d6e4baa88680f7bc5f42e0887df6000000000000000000000000e04cc55ebee1cbce552f250e85c57b70b2e2625b000000000000000000000000e8f04291d3632612ac8b2d6063f5fc1912d8309900000000000000000000000096765ee9a2db13f6a7223f1f2152468fe34de00e",
        "destination": "0xc48cc24cd6a119bdf677876e06d2e3a1946feb1d",
        "eventProofId": "890",
        "validatorSetId": "150"
      },
      "__kind": "Ethereum"
    }
  },
  "name": "EthBridge.EventSend",
  "block_id": "0003022295-dc0e6",
  "block": {
2023-02-22 18:04:53.252  INFO tokio-runtime-worker ethy: πŸ’Ž got witness: Witness { digest: [18, 145, 32, 35, 139, 254, 89, 214, 220, 27, 57, 253, 30, 219, 148, 143, 165, 65, 187, 10, 79, 158, 176, 62, 162, 19, 145, 51, 167, 120, 50, 7], chain_id: Xrpl, event_id: 897, validator_set_id: 157, authority_id: Public(0389411795514af1627765eceffcbd002719f031604fadd7d188e2dc585b4e1afb (KWBpGtyJ...)), signature: Signature(a0cae2d03ec1437b1205620e94ee3ba2de9240805b448bedeb5831f306829a251b57a9a7e2905ae81b63ef104a88c44f4abe2cefc9f3decd8b053f641b18e0de00) }
2023-02-22 18:04:53.252  WARN tokio-runtime-worker ethy: πŸ’Ž witness digest signature verification failed: 897 from Public(0389411795514af1627765eceffcbd002719f031604fadd7d188e2dc585b4e1afb (KWBpGtyJ...))

The problem was introduced with #427
basically, the sig generation function assumes pre hashed digest and the sig verification function hashes the digest again.