From f91e2ea9736a54c910c0cabfd4ebd95ec9151f18 Mon Sep 17 00:00:00 2001 From: mei Date: Thu, 21 Mar 2024 16:02:57 -0400 Subject: [PATCH 1/5] update validator related info --- .github/ISSUE_TEMPLATE/validator-request.md | 18 +++++++++ .../devnet/defaultValidatorList.json | 34 ++++++----------- .../testnet/defaultValidatorList.json | 23 ++++++++--- test/berachain-default-validators.test.js | 38 +++++++++++++++++++ 4 files changed, 85 insertions(+), 28 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/validator-request.md create mode 100644 test/berachain-default-validators.test.js diff --git a/.github/ISSUE_TEMPLATE/validator-request.md b/.github/ISSUE_TEMPLATE/validator-request.md new file mode 100644 index 000000000..d856bf0b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/validator-request.md @@ -0,0 +1,18 @@ +--- +name: Validator Request +about: Request a validator addition +title: "Add {VALIDATOR_NAME}" +labels: validator request +assignees: "" +--- + +- [ ] I understand that filing an issue does not guarantee addition to the Berachain default validator list. +- [ ] I will not ping the Discord about this listing request. + +**Please provide the following information for your validator.** + +Validator Index: +Validator Name: +Validator Logo URI: +Link to Twitter: +Link to website: diff --git a/src/validators/devnet/defaultValidatorList.json b/src/validators/devnet/defaultValidatorList.json index 96eac58f2..477e170af 100644 --- a/src/validators/devnet/defaultValidatorList.json +++ b/src/validators/devnet/defaultValidatorList.json @@ -2,30 +2,18 @@ "name": "Devnet Default Validator List", "validators": [ { - "address": "0x6B7C3B5c0928cf8D0B516b358a1e3aecf5E9AFBe", - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/assets/bera.png" + "validatorIndex": 0, + "name": "Infrared", + "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/infrared.jpg", + "twitter": "https://twitter.com/InfraredCrypto", + "website": "https://infraredcrypto.io" }, { - "address": "0x82Cf147a9aC43A84D30f71f8a627492D08e485Ef", - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/assets/bera.png" - }, - { - "address": "0xE7E474C22Ea47EbD5212B310F2E7Ae8c7ce70b4b", - "logoURI": "" - } - ], - "validatorMap": { - "0x6B7C3B5c0928cf8D0B516b358a1e3aecf5E9AFBe": { - "address": "0x6B7C3B5c0928cf8D0B516b358a1e3aecf5E9AFBe", - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/assets/bera.png" - }, - "0x82Cf147a9aC43A84D30f71f8a627492D08e485Ef": { - "address": "0x82Cf147a9aC43A84D30f71f8a627492D08e485Ef", - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/assets/bera.png" - }, - "0xE7E474C22Ea47EbD5212B310F2E7Ae8c7ce70b4b": { - "address": "0xE7E474C22Ea47EbD5212B310F2E7Ae8c7ce70b4b", - "logoURI": "" + "validatorIndex": 0, + "name": "The Honey Jar", + "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/thj.jpg", + "twitter": "https://twitter.com/TheHoneyJar1", + "website": "https://thehoneyjar.io" } - } + ] } diff --git a/src/validators/testnet/defaultValidatorList.json b/src/validators/testnet/defaultValidatorList.json index e4414027b..b9c951149 100644 --- a/src/validators/testnet/defaultValidatorList.json +++ b/src/validators/testnet/defaultValidatorList.json @@ -1,11 +1,24 @@ { "name": "Testnet Default Validator List", - "validatorMap": { - "0x0cf633F3a7478EAAbd73B7287B997D609B12A11a": { - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/infrared.jpg" + "validators": [ + { + "validatorIndex": 0, + "name": "Infrared", + "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/infrared.jpg", + "twitter": "https://twitter.com/InfraredCrypto", + "website": "https://infraredcrypto.io" }, - "0x7BC2D01C25d0d53b79Cba0B286FF685DDDA3c01c": { - "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/thj.jpg" + { + "validatorIndex": 0, + "name": "The Honey Jar", + "logoURI": "https://artio-static-asset-public.s3.ap-southeast-1.amazonaws.com/validator-assets/thj.jpg", + "twitter": "https://twitter.com/TheHoneyJar1", + "website": "https://thehoneyjar.io" } + ], + "version": { + "major": 1, + "minor": 0, + "patch": 0 } } diff --git a/test/berachain-default-validators.test.js b/test/berachain-default-validators.test.js new file mode 100644 index 000000000..09497aa3f --- /dev/null +++ b/test/berachain-default-validators.test.js @@ -0,0 +1,38 @@ +const packageJson = require("../package.json"); +const { expect } = require("chai"); +const fetch = require("node-fetch"); +const defaultValidatorList = require("../src/validators/testnet/defaultValidatorList.json"); + +before(async function () { + this.timeout(120000); +}); + +describe("gauge list test suite", () => { + it("contains no duplicate index", () => { + const map = {}; + for (let validator of defaultValidatorList.validators) { + let index = validator.validatorIndex.toString(); + const key = `${validator.name}-${index}`; + expect(typeof map[key]).to.equal( + "undefined", + `duplicate symbol: ${index}` + ); + map[key] = true; + } + }); + + it("all logo links are valid", async () => { + await defaultValidatorList.validators.map((validator) => + fetch(validator.logoURI).then((response) => { + expect(response.status).to.equal(200); + }) + ); + }, 30000); + + it("version matches package.json", () => { + expect(packageJson.version).to.match(/^\d+\.\d+\.\d+$/); + expect(packageJson.version).to.equal( + `${defaultValidatorList.version.major}.${defaultValidatorList.version.minor}.${defaultValidatorList.version.patch}` + ); + }); +}); From 7b9e6c64d22d57f4ff0610a48457e8df9f47e036 Mon Sep 17 00:00:00 2001 From: mei Date: Thu, 21 Mar 2024 16:06:00 -0400 Subject: [PATCH 2/5] add version --- src/validators/devnet/defaultValidatorList.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/validators/devnet/defaultValidatorList.json b/src/validators/devnet/defaultValidatorList.json index 477e170af..6c5c1e8a0 100644 --- a/src/validators/devnet/defaultValidatorList.json +++ b/src/validators/devnet/defaultValidatorList.json @@ -15,5 +15,10 @@ "twitter": "https://twitter.com/TheHoneyJar1", "website": "https://thehoneyjar.io" } - ] + ], + "version": { + "major": 1, + "minor": 0, + "patch": 0 + } } From 98f5cfbc5a045ef54c5e4bedd0f8a2ea694709be Mon Sep 17 00:00:00 2001 From: mei Date: Fri, 22 Mar 2024 15:49:01 -0400 Subject: [PATCH 3/5] add cloudinary deployment action --- .github/workflows/cloudinary.yaml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cloudinary.yaml diff --git a/.github/workflows/cloudinary.yaml b/.github/workflows/cloudinary.yaml new file mode 100644 index 000000000..42357aa7f --- /dev/null +++ b/.github/workflows/cloudinary.yaml @@ -0,0 +1,35 @@ +name: Deploy to Cloudinary + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + # Install Cloudinary CLI + - name: Install Cloudinary CLI + run: | + npm install -g cloudinary-cli + + # Configure Cloudinary Environment Variables + - name: Configure Cloudinary Environment + run: | + echo "CLOUDINARY_URL=cloudinary://$CLOUDINARY_API_KEY:$CLOUDINARY_API_SECRET@$CLOUDINARY_CLOUD_NAME" > $GITHUB_ENV + env: + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} + + # Upload to Cloudinary + - name: Upload to Cloudinary + run: | + set -e # Ensure the script fails on error + cld upload_folder ${GITHUB_WORKSPACE}/src/ --recursive true + echo "Upload to Cloudinary completed successfully." From 034110a70535978058002420f73a612c814c482d Mon Sep 17 00:00:00 2001 From: aiweithesushigirl Date: Thu, 30 May 2024 16:13:16 -0400 Subject: [PATCH 4/5] fix test --- test/berachain-default-validators.test.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/berachain-default-validators.test.js b/test/berachain-default-validators.test.js index 09497aa3f..234ee262d 100644 --- a/test/berachain-default-validators.test.js +++ b/test/berachain-default-validators.test.js @@ -7,11 +7,11 @@ before(async function () { this.timeout(120000); }); -describe("gauge list test suite", () => { +describe("validator list test suite", () => { it("contains no duplicate index", () => { const map = {}; for (let validator of defaultValidatorList.validators) { - let index = validator.validatorIndex.toString(); + let index = validator.id.toString(); const key = `${validator.name}-${index}`; expect(typeof map[key]).to.equal( "undefined", @@ -28,11 +28,4 @@ describe("gauge list test suite", () => { }) ); }, 30000); - - it("version matches package.json", () => { - expect(packageJson.version).to.match(/^\d+\.\d+\.\d+$/); - expect(packageJson.version).to.equal( - `${defaultValidatorList.version.major}.${defaultValidatorList.version.minor}.${defaultValidatorList.version.patch}` - ); - }); }); From 9a84eb25c77650b726f20b6b88dea2de5a6fb469 Mon Sep 17 00:00:00 2001 From: aiweithesushigirl Date: Thu, 30 May 2024 16:14:10 -0400 Subject: [PATCH 5/5] fix template --- .github/ISSUE_TEMPLATE/validator-request.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/validator-request.md b/.github/ISSUE_TEMPLATE/validator-request.md index d856bf0b5..d00abfc02 100644 --- a/.github/ISSUE_TEMPLATE/validator-request.md +++ b/.github/ISSUE_TEMPLATE/validator-request.md @@ -11,8 +11,7 @@ assignees: "" **Please provide the following information for your validator.** -Validator Index: +Validator ID: Validator Name: Validator Logo URI: -Link to Twitter: Link to website: