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

Identity field for Validators #254

Merged
merged 12 commits into from
Sep 6, 2024
Merged

Identity field for Validators #254

merged 12 commits into from
Sep 6, 2024

Conversation

owl352
Copy link
Collaborator

@owl352 owl352 commented Sep 5, 2024

Issue

Every validator has a hash, which can be transformed to a base58 identifier
By this identifier we can get more info about validator

Things done

Added new module bs58 to project, which can transform BufferArray to base58 string
Updated Validator for new field
Updated README.md
Updated tests

new output for validators example:

{
  "proTxHash": "754B89DAE8DB20FC4CEE5E3ADB07B146D7EFE508A66FA0A8E1094675B9DAA35E",
  "isActive": true,
  "proposedBlocksAmount": 77,
  "lastProposedBlockHeader": {
    "hash": "3251017E259B985AED7CA626EDE3A6A38F7C76ECF9B2DEA62519F2C7EBE412BE",
    "height": 2526,
    "timestamp": "2024-08-30T03:48:17.094Z",
    "blockVersion": 14,
    "appVersion": 1,
    "l1LockedHeight": 1093240,
    "validator": "754B89DAE8DB20FC4CEE5E3ADB07B146D7EFE508A66FA0A8E1094675B9DAA35E"
  },
  "proTxInfo": {
    "type": "Evo",
    "collateralHash": "6ce8545e25d4f03aba1527062d9583ae01827c65b234bd979aca5954c6ae3a59",
    "collateralIndex": 25,
    "collateralAddress": "yc8K5Z6LKBHhMTqK8zgih4ebdjeQ5mTyKZ",
    "operatorReward": 0,
    "confirmations": 246987,
    "state": {
      "version": 2,
      "service": "44.233.44.95:19999",
      "registeredHeight": 850334,
      "lastPaidHeight": 1097311,
      "consecutivePayments": 0,
      "PoSePenalty": 0,
      "PoSeRevivedHeight": 1083081,
      "PoSeBanHeight": -1,
      "revocationReason": 0,
      "ownerAddress": "yhKYB5z9vsmurGiJs1LdraDuBmwg2E5751",
      "votingAddress": "yhKYB5z9vsmurGiJs1LdraDuBmwg2E5751",
      "platformNodeID": "46d938862af6d9a291e26c0048177db2892a710b",
      "platformP2PPort": 36656,
      "platformHTTPPort": 1443,
      "payoutAddress": "yeRZBWYfeNE4yVUHV4ZLs83Ppn9aMRH57A",
      "pubKeyOperator": "99b9f0fbeea3822cdc5b3654dea52103b3d9d5f01db4201955ea3689074d37da4711d8f313d4b5458eef3395aa75bfc7"
    }
  },
  "identity":  "8tsWRSwsTM5AXv4ViCF9gu39kzjbtfFDM6rCyL2RcFzd"
}

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-explorer-mainnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 11:52pm
platform-explorer-testnet 🛑 Canceled (Inspect) Sep 5, 2024 11:52pm

packages/api/README.md Outdated Show resolved Hide resolved
packages/api/package.json Outdated Show resolved Hide resolved
packages/api/src/models/Validator.js Outdated Show resolved Hide resolved
@pshenmic pshenmic merged commit ce9cf93 into master Sep 6, 2024
9 checks passed
@owl352 owl352 deleted the feat/validators-hash branch November 23, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend (API)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants