node: increase Polygon minimum confirmation to 512

It appears that in spite of exceeding the recommended value by 2x,
256 offers insufficient safety margin given that we saw two reorgs
of depths 178 and 187 recently: https://polygonscan.com/blocks_forked

This will increase confirmation delay from ~10 minutes to ~20 minutes.

commit-id:cf2b1503
This commit is contained in:
Leo 2022-02-08 14:32:31 +01:00 committed by Leopold Schabel
parent cf3f6def68
commit 7ae4b3d6aa
1 changed files with 2 additions and 2 deletions

View File

@ -638,10 +638,10 @@ func runNode(cmd *cobra.Command, args []string) {
*polygonRPC, polygonContractAddr, "polygon", common.ReadinessPolygonSyncing, vaa.ChainIDPolygon, lockC, nil, *polygonRPC, polygonContractAddr, "polygon", common.ReadinessPolygonSyncing, vaa.ChainIDPolygon, lockC, nil,
// Special case: Polygon can fork like PoW Ethereum, and it's not clear what the safe number of blocks is // Special case: Polygon can fork like PoW Ethereum, and it's not clear what the safe number of blocks is
// //
// Hardcode the minimum number of confirmations to 256 regardless of what the smart contract specifies to protect // Hardcode the minimum number of confirmations to 512 regardless of what the smart contract specifies to protect
// developers from accidentally specifying an unsafe number of confirmations. We can remove this restriction as soon // developers from accidentally specifying an unsafe number of confirmations. We can remove this restriction as soon
// as specific public guidance exists for Polygon developers. // as specific public guidance exists for Polygon developers.
256).Run); err != nil { 512).Run); err != nil {
return err return err
} }
if err := supervisor.Run(ctx, "avalanchewatch", if err := supervisor.Run(ctx, "avalanchewatch",