Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty signing power workaround #4663

Merged
merged 5 commits into from
Oct 4, 2024
Merged

Empty signing power workaround #4663

merged 5 commits into from
Oct 4, 2024

Conversation

Frozen
Copy link
Contributor

@Frozen Frozen commented Apr 24, 2024

https://github.com/harmony-one/harmony/pull/4663/files#diff-9cfef24a4e8a4cf4ef84b772edcde2d1c3993f8373a9b9a376377c1385802f29R156

if crosslink are not sent for an entire epoch signed and toSign will be 0 and 0.
when that happen, next epoch there will no shard 1 validator elected in the committee.

@Frozen Frozen changed the title Below Threshold fix Empty signing power workaround. Apr 24, 2024
@sophoah
Copy link
Contributor

sophoah commented May 2, 2024

could you update the PR so this one is part of an epoch activation. Thanks

@Frozen Frozen marked this pull request as draft June 4, 2024 20:42
@Frozen Frozen self-assigned this Jun 13, 2024
@Frozen Frozen force-pushed the feature/return-testnet branch from 428bb20 to aa57224 Compare August 28, 2024 18:41
@Frozen Frozen marked this pull request as ready for review August 28, 2024 18:46
@mergify mergify bot mentioned this pull request Aug 28, 2024
@sophoah
Copy link
Contributor

sophoah commented Sep 3, 2024

Tested successfully in localnet where I had to :

  1. prevent broadcast of crosslink
  2. define localnet HIP32Epoch activation to 0

see the validator information showing all the signed/to-sign at 0 and the validator still active in the committee :

hmy blockchain validator information one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf --node="http://localhost:9500"
{
  "id": "1",
  "jsonrpc": "2.0",
  "result": {
    "active-status": "active",
    "booted-status": null,
    "current-epoch-performance": {
      "block": 486,
      "current-epoch-signing-percent": {
        "current-epoch-signed": 0,
        "current-epoch-signing-percentage": "0",
        "current-epoch-to-sign": 0
      },
      "epoch": 31
    },
    "currently-in-committee": true,
    "epos-status": "currently elected",
    "epos-winning-stake": "6750000000000000000000",
    "lifetime": {
      "apr": "0",
      "blocks": {
        "signed": 0,
        "to-sign": 0
      },
      "epoch-apr": [
        {
          "apr": "0",
          "epoch": 3
        },
        {
          "apr": "0",
          "epoch": 4
        },
        {
          "apr": "0",
          "epoch": 5
        },
        {
          "apr": "0",
          "epoch": 6
        },
        {
          "apr": "0",
          "epoch": 7
        },
        {
          "apr": "0",
          "epoch": 8
        },
        {
          "apr": "0",
          "epoch": 9
        },
        {
          "apr": "0",
          "epoch": 10
        },
        {
          "apr": "0",
          "epoch": 11
        },
        {
          "apr": "0",
          "epoch": 12
        },
        {
          "apr": "0",
          "epoch": 13
        },
        {
          "apr": "0",
          "epoch": 14
        },
        {
          "apr": "0",
          "epoch": 15
        },
        {
          "apr": "0",
          "epoch": 16
        },
        {
          "apr": "0",
          "epoch": 17
        },
        {
          "apr": "0",
          "epoch": 18
        },
        {
          "apr": "0",
          "epoch": 19
        },
        {
          "apr": "0",
          "epoch": 20
        },
        {
          "apr": "0",
          "epoch": 21
        },
        {
          "apr": "0",
          "epoch": 22
        },
        {
          "apr": "0",
          "epoch": 23
        },
        {
          "apr": "0",
          "epoch": 24
        },
        {
          "apr": "0",
          "epoch": 25
        },
        {
          "apr": "0",
          "epoch": 26
        },
        {
          "apr": "0",
          "epoch": 27
        },
        {
          "apr": "0",
          "epoch": 28
        },
        {
          "apr": "0",
          "epoch": 29
        },
        {
          "apr": "0",
          "epoch": 30
        }
      ],
      "epoch-blocks": [
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 30
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 29
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 28
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 27
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 26
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 25
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 24
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 23
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 22
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 21
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 20
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 19
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 18
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 17
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 16
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 15
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 14
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 13
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 12
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 11
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 10
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 9
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 8
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 7
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 6
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 5
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 4
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 3
        },
        {
          "blocks": {
            "signed": 0,
            "to-sign": 0
          },
          "epoch": 2
        }
      ],
      "reward-accumulated": 0
    },
    "metrics": {
      "by-bls-key": [
        {
          "earned-reward": 0,
          "key": {
            "bls-public-key": "89eab762e7364d6cf89f7a6c54da794f74eba2e29147992ac66adcef0f0654ef8a727710ee55ad8b532da0dd87811915",
            "earning-account": "one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf",
            "effective-stake": "6750000000000000000000",
            "group-percent": "0.402985074626865672",
            "overall-percent": "0.128955223880597015",
            "raw-stake": "10000000000000000000000",
            "shard-id": 1
          }
        }
      ]
    },
    "total-delegation": 1e+22,
    "validator": {
      "address": "one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf",
      "bls-public-keys": [
        "89eab762e7364d6cf89f7a6c54da794f74eba2e29147992ac66adcef0f0654ef8a727710ee55ad8b532da0dd87811915"
      ],
      "creation-height": 21,
      "delegations": [
        {
          "amount": 1e+22,
          "delegator-address": "one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf",
          "reward": 0,
          "undelegations": []
        }
      ],
      "details": "validator4",
      "identity": "validator4",
      "last-epoch-in-committee": 31,
      "max-change-rate": "0.1",
      "max-rate": "0.1",
      "max-total-delegation": 1e+26,
      "min-self-delegation": 1e+22,
      "name": "s1-localnet-validator4",
      "rate": "0.1",
      "security-contact": "localnet",
      "update-height": 21,
      "website": "localnet.one"
    }
  }
}

@sophoah
Copy link
Contributor

sophoah commented Sep 3, 2024

@Frozen please fix the conflict and i can re test with the latest version before we can all approve an merge

@sophoah
Copy link
Contributor

sophoah commented Oct 3, 2024

@Frozen

@Frozen Frozen force-pushed the feature/return-testnet branch from 1545bef to e71b3d7 Compare October 3, 2024 14:39
@Frozen
Copy link
Contributor Author

Frozen commented Oct 3, 2024

@sophoah resolved

@sophoah
Copy link
Contributor

sophoah commented Oct 4, 2024

tested successfully with result the same as in #4663 (comment)

@sophoah sophoah changed the title Empty signing power workaround. Empty signing power workaround Oct 4, 2024
@sophoah sophoah requested a review from GheisMohammadi October 4, 2024 05:14
@sophoah sophoah merged commit 1588c05 into dev Oct 4, 2024
4 checks passed
@sophoah sophoah deleted the feature/return-testnet branch October 4, 2024 09:21
@sophoah sophoah mentioned this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants