harmony icon indicating copy to clipboard operation
harmony copied to clipboard

Feature: 1 second finality

Open Frozen opened this issue 1 year ago • 1 comments

added 2 params.Config
	IsOneSecondEpoch *big.Int `json:"is-one-second-epoch,omitempty"`

	IsRotationEachBlockEpoch *big.Int `json:"is-rotation-each-block-epoch"`
applied with
LeaderRotationInternalValidatorsEpoch: big.NewInt(2),
LeaderRotationExternalValidatorsEpoch: big.NewInt(2),
IsOneSecondEpoch:         big.NewInt(2),
IsRotationEachBlockEpoch: big.NewInt(2),
commission calculation
	// TwoSecStakedBlocks is the flat-rate block reward after epoch 360.
	// 7 ONE per block
	TwoSecStakedBlocks = numeric.NewDecFromBigInt(new(big.Int).Mul(
		big.NewInt(7*denominations.Nano), big.NewInt(denominations.Nano),
	))
	// HIP30StakedBlocks is the reward received after HIP-30 goes into
	// effect. It is simply double the TwoSecStakedBlocks reward, since
	// the number of shards is being halved and we keep emission
	// constant.
	HIP30StakedBlocks = numeric.NewDecFromBigInt(new(big.Int).Mul(
		big.NewInt(14*denominations.Nano), big.NewInt(denominations.Nano),
	))

	// OneSecStakedBlock is half of HIP30
	OneSecStakedBlock = numeric.NewDecFromBigInt(new(big.Int).Mul(
		big.NewInt(7*denominations.Nano), big.NewInt(denominations.Nano),
	))

1-second epoch finality.

Frozen avatar Oct 13 '24 21:10 Frozen

⚠️ The sha of the head commit of this PR conflicts with #4738. Mergify cannot evaluate rules on this PR. ⚠️

mergify[bot] avatar Oct 13 '24 21:10 mergify[bot]

i also tested in localnet the PR, there are issue with the signature collection as soon as the 1s epoch start (currently set at epoch 6)

        {
          "blocks": {
            "signed": 89,
            "to-sign": 128
          },
          "epoch": 7
        },
        {
          "blocks": {
            "signed": 87,
            "to-sign": 128
          },
          "epoch": 6
        },
        {
          "blocks": {
            "signed": 122,
            "to-sign": 128
          },
          "epoch": 5
        },
        {
          "blocks": {
            "signed": 128,
            "to-sign": 128
          },
          "epoch": 4
        },

We can see the same issue in the node logs as numSignatures field is sometime set to 0 image

sophoah avatar Oct 23 '24 09:10 sophoah