Forum

Synchronize the finality threshold with POSDAO consensus

Hi xDai bridge governors,

For historical reasons, the initial value of the finality threshold for the xDai chain was chosen as 1 block. This parameters defines how many blocks must be mined on top of the studied one before the bridge oracles consider the block as finalized and it is safe to handle the transactions within this block. This parameters worked well for two years providing very good latency of relaying the information through the bridge. At the same time, there is a contradiction: the POSDAO consensus considers the block as finalized if 50%+1 of POSDAO validators produced new blocks on top of it. It means that before this threshold is reached the block can be staled as per the POSDAO validators decision and this action could impact the bridge operations in case if a malicious transaction to the bridge was included in such block.

That’s why we think it is important to synchronize the finality threshold in the bridge with the finality threshold of the POSDAO consensus. The current number of the xDai POSDAO consensus participants is 12. So, the reasonable value for the finality threshold on the xDai bridge is 8.

It is important to note that the new value will increase latency of the xDai bridge (the delay between the transaction was mined and it was handled by the bridge oracles) but harden the bridge security.

If you agree to change the required block confirmations on the xDai side to 8 please perform the following:

  1. Import your xDai bridge validator private key to the MetaMask or NiftyWallet.
  2. Visit the multisig wallet contract in the BlockScout.
  3. Enter to the field next to the method confirmTransaction the transaction ID 11.
  4. Press the “Write” button.
  5. In the MM/NW section change the gas to 500’000 and confirm the transaction.

If you have any question or issues appeared during the described steps, write a note below this forum post. As soon as you send a transaction with confirmation, reply to this message.

1 Like

This is a transaction the multisig participant from the POA Network project made to initialize the suggested changes:

The correspondence of the ABI encoded method call to the human readable form of the call can be checked if you take ABI:

[
  {
    "type":"function",
    "stateMutability":"nonpayable",
    "payable":false,
    "outputs":[
      
    ],
    "name":"setRequiredBlockConfirmations",
    "inputs":[
      {
        "type":"uint256",
        "name":"_blockConfirmations"
      }
    ],
    "constant":false
  }
]

and use it on the service: https://abi.hashex.org/#

1 Like

@geleeroyale/@GriffGreen, @mgarcia/@ArseniiPetrovich and @mariano.conti/@savdao please take into consideration.

You will need to submit one transactions to the xDai chain.

1 Like

Hi @akolotov.

It’s done. TX ID 11 signed by Protofire

2 Likes

Signed and executed

2 Likes

Thanks @GriffGreen and @mgarcia! The threshold has been updated successfully:

1 Like