From 60780c68b568c1eccbfb50cefc5365ec35a56de7 Mon Sep 17 00:00:00 2001 From: Vasyl Ivanchuk Date: Tue, 28 Nov 2023 17:25:01 +0200 Subject: [PATCH] feat: add sepolia production config (#100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What ❔ 1. Remove new prover notification since it's not needed anymore. 2. Add Sepolia Testnet production configuration. ## Why ❔ We need a Sepolia block explorer production environment to eventually use it as a main Testnet environment. ## Checklist - [X] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [X] Tests for the changes have been added / updated. --- .../app/src/components/NewProverInfoBox.vue | 44 ------------------- .../app/src/components/batches/InfoTable.vue | 6 --- .../components/batches/InfoTableSection.vue | 3 -- .../app/src/components/blocks/InfoTable.vue | 6 --- .../src/components/blocks/InfoTableBlock.vue | 3 -- packages/app/src/composables/useBatch.ts | 20 +-------- packages/app/src/composables/useBlock.ts | 15 +------ .../app/src/composables/useRuntimeConfig.ts | 3 +- packages/app/src/configs/dev.config.json | 5 --- packages/app/src/configs/index.ts | 1 - packages/app/src/configs/local.config.json | 1 - .../app/src/configs/production.config.json | 21 +++++++-- packages/app/src/configs/staging.config.json | 4 -- packages/app/src/locales/en.json | 10 ++--- packages/app/src/locales/uk.json | 7 +-- packages/app/src/utils/constants.ts | 2 - .../tests/composables/useTransaction.spec.ts | 5 +-- .../features/artifacts/artifactsSet1.feature | 4 +- .../features/artifacts/artifactsSet3.feature | 4 +- .../redirection/redirectionSet3.feature | 6 +-- packages/app/tests/mocks.ts | 2 - 21 files changed, 35 insertions(+), 137 deletions(-) delete mode 100644 packages/app/src/components/NewProverInfoBox.vue diff --git a/packages/app/src/components/NewProverInfoBox.vue b/packages/app/src/components/NewProverInfoBox.vue deleted file mode 100644 index 07636ef04b..0000000000 --- a/packages/app/src/components/NewProverInfoBox.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/packages/app/src/components/batches/InfoTable.vue b/packages/app/src/components/batches/InfoTable.vue index 934f06ac9d..e0a0874d46 100644 --- a/packages/app/src/components/batches/InfoTable.vue +++ b/packages/app/src/components/batches/InfoTable.vue @@ -11,7 +11,6 @@ import { useI18n } from "vue-i18n"; import { useWindowSize } from "@vueuse/core"; -import NewProverInfoBox from "@/components/NewProverInfoBox.vue"; import InfoTableSection from "@/components/batches/InfoTableSection.vue"; import CopyContent from "@/components/common/table/fields/CopyContent.vue"; import TimeField from "@/components/common/table/fields/TimeField.vue"; @@ -88,11 +87,6 @@ const tableInfoItems = computed(() => { url: currentNetwork.value.l1ExplorerUrl ? `${currentNetwork.value.l1ExplorerUrl}/tx/${props.batch[key]}` : undefined, - ...(key === "proveTxHash" && - props.batch.isProvenByNewProver && { - additionalContentComponent: NewProverInfoBox, - additionalContentProps: { context: "batch" }, - }), }, { label: t(`batches.${timeKey}`), diff --git a/packages/app/src/components/batches/InfoTableSection.vue b/packages/app/src/components/batches/InfoTableSection.vue index 49ea0ee25c..86e332fcab 100644 --- a/packages/app/src/components/batches/InfoTableSection.vue +++ b/packages/app/src/components/batches/InfoTableSection.vue @@ -17,9 +17,6 @@ -
- -
diff --git a/packages/app/src/components/blocks/InfoTable.vue b/packages/app/src/components/blocks/InfoTable.vue index 1b3eb3bdaf..9c2ddc43c4 100644 --- a/packages/app/src/components/blocks/InfoTable.vue +++ b/packages/app/src/components/blocks/InfoTable.vue @@ -11,7 +11,6 @@ import { useI18n } from "vue-i18n"; import { useWindowSize } from "@vueuse/core"; -import NewProverInfoBox from "@/components/NewProverInfoBox.vue"; import InfoTableBlock from "@/components/blocks/InfoTableBlock.vue"; import CopyContent from "@/components/common/table/fields/CopyContent.vue"; import TimeField from "@/components/common/table/fields/TimeField.vue"; @@ -113,11 +112,6 @@ const tableInfoItems = computed(() => { url: currentNetwork.value.l1ExplorerUrl ? `${currentNetwork.value.l1ExplorerUrl}/tx/${props.block[key]}` : undefined, - ...(key === "proveTxHash" && - props.block.isProvenByNewProver && { - additionalContentComponent: NewProverInfoBox, - additionalContentProps: { context: "block" }, - }), }, { label: t(`blocks.table.${timeKey}`), diff --git a/packages/app/src/components/blocks/InfoTableBlock.vue b/packages/app/src/components/blocks/InfoTableBlock.vue index 36c6b0e782..cade76c928 100644 --- a/packages/app/src/components/blocks/InfoTableBlock.vue +++ b/packages/app/src/components/blocks/InfoTableBlock.vue @@ -26,9 +26,6 @@ -
- -
diff --git a/packages/app/src/composables/useBatch.ts b/packages/app/src/composables/useBatch.ts index 7eeb2916ff..57a65b2599 100644 --- a/packages/app/src/composables/useBatch.ts +++ b/packages/app/src/composables/useBatch.ts @@ -4,34 +4,19 @@ import { $fetch, FetchError } from "ohmyfetch"; import useContext from "@/composables/useContext"; -export type BatchDetails = Api.Response.BatchDetails & { - isProvenByNewProver?: boolean; -}; +export type BatchDetails = Api.Response.BatchDetails; export default (context = useContext()) => { const isRequestPending = ref(false); const isRequestFailed = ref(false); const batchItem = ref(null); - const getBatchNewProof = async (id: string) => { - try { - return await $fetch(`${context.currentNetwork.value.newProverUrl}/proof_${id}.bin`, { method: "HEAD" }); - } catch (error: unknown) { - return null; - } - }; - const getById = async (id: string) => { isRequestPending.value = true; isRequestFailed.value = false; try { - const batch = await $fetch(`${context.currentNetwork.value.apiUrl}/batches/${id}`); - if (batch.proveTxHash) { - const proof = await getBatchNewProof(id); - batch.isProvenByNewProver = !!proof; - } - batchItem.value = batch; + batchItem.value = await $fetch(`${context.currentNetwork.value.apiUrl}/batches/${id}`); } catch (error: unknown) { batchItem.value = null; if (!(error instanceof FetchError) || error.response?.status !== 404) { @@ -43,7 +28,6 @@ export default (context = useContext()) => { }; return { - getBatchNewProof, getById, batchItem, isRequestPending, diff --git a/packages/app/src/composables/useBlock.ts b/packages/app/src/composables/useBlock.ts index c2002feeb5..c605f43de8 100644 --- a/packages/app/src/composables/useBlock.ts +++ b/packages/app/src/composables/useBlock.ts @@ -43,25 +43,12 @@ export default (context = useContext()) => { const isRequestFailed = ref(false); const blockItem = ref(null); - const getBatchNewProof = async (id: number) => { - try { - return await $fetch(`${context.currentNetwork.value.newProverUrl}/proof_${id}.bin`, { method: "HEAD" }); - } catch (error: unknown) { - return null; - } - }; - const getById = async (id: string) => { isRequestPending.value = true; isRequestFailed.value = false; try { - const data = await $fetch(`${context.currentNetwork.value.apiUrl}/blocks/${id}`); - if (data.l1BatchNumber && data.proveTxHash) { - const proof = await getBatchNewProof(data.l1BatchNumber); - data.isProvenByNewProver = !!proof; - } - blockItem.value = data; + blockItem.value = await $fetch(`${context.currentNetwork.value.apiUrl}/blocks/${id}`); } catch (error: unknown) { blockItem.value = null; if (!(error instanceof FetchError) || error.response?.status !== 404) { diff --git a/packages/app/src/composables/useRuntimeConfig.ts b/packages/app/src/composables/useRuntimeConfig.ts index eca6a21706..b0a053ee8e 100644 --- a/packages/app/src/composables/useRuntimeConfig.ts +++ b/packages/app/src/composables/useRuntimeConfig.ts @@ -8,11 +8,10 @@ export const DEFAULT_NETWORK: NetworkConfig = { icon: "/images/icons/zksync-arrows.svg", l1ExplorerUrl: "https://goerli.etherscan.io", l2ChainId: 280, - l2NetworkName: "zkSync Era Testnet", + l2NetworkName: "zkSync Era Goerli Testnet", l2WalletUrl: "https://goerli.portal.zksync.io/", maintenance: false, name: "goerli", - newProverUrl: "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", published: true, rpcUrl: "https://testnet.era.zksync.dev", }; diff --git a/packages/app/src/configs/dev.config.json b/packages/app/src/configs/dev.config.json index 052fed4a04..7f69a0d55e 100644 --- a/packages/app/src/configs/dev.config.json +++ b/packages/app/src/configs/dev.config.json @@ -12,7 +12,6 @@ "l2WalletUrl": "http://localhost:3000", "maintenance": false, "name": "local", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "http://localhost:3050" }, @@ -30,7 +29,6 @@ "l2WalletUrl": "https://goerli.staging-portal.zksync.dev/", "maintenance": false, "name": "goerli", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://testnet.era.zksync.dev" }, @@ -46,7 +44,6 @@ "l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet", "maintenance": false, "name": "sepolia", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://sepolia.era.zksync.dev" }, @@ -63,7 +60,6 @@ "l2WalletUrl": "https://goerli-beta.staging-portal.zksync.dev/", "maintenance": false, "name": "goerli-beta", - "newProverUrl": "https://storage.googleapis.com/zksync-era-stage-proofs/proofs_fri", "published": true, "rpcUrl": "https://z2-dev-api.zksync.dev" }, @@ -81,7 +77,6 @@ "l2WalletUrl": "https://staging-portal.zksync.dev/", "maintenance": false, "name": "mainnet", - "newProverUrl": "https://storage.googleapis.com/zksync-era-mainnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://mainnet.era.zksync.io" } diff --git a/packages/app/src/configs/index.ts b/packages/app/src/configs/index.ts index 3856403daf..5660e1ccdd 100644 --- a/packages/app/src/configs/index.ts +++ b/packages/app/src/configs/index.ts @@ -3,7 +3,6 @@ export type NetworkConfig = { icon: string; verificationApiUrl?: string; apiUrl: string; - newProverUrl: string; rpcUrl: string; bridgeUrl?: string; l2NetworkName: string; diff --git a/packages/app/src/configs/local.config.json b/packages/app/src/configs/local.config.json index d88a9f9ca1..afd0e82298 100644 --- a/packages/app/src/configs/local.config.json +++ b/packages/app/src/configs/local.config.json @@ -12,7 +12,6 @@ "l2WalletUrl": "http://localhost:3000", "maintenance": false, "name": "local", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "http://localhost:3050" } diff --git a/packages/app/src/configs/production.config.json b/packages/app/src/configs/production.config.json index 3df42c773d..bc25acca32 100644 --- a/packages/app/src/configs/production.config.json +++ b/packages/app/src/configs/production.config.json @@ -10,14 +10,30 @@ "icon": "/images/icons/zksync-arrows.svg", "l1ExplorerUrl": "https://goerli.etherscan.io", "l2ChainId": 280, - "l2NetworkName": "zkSync Era Testnet", + "l2NetworkName": "zkSync Era Goerli Testnet", "l2WalletUrl": "https://goerli.portal.zksync.io/", "maintenance": false, "name": "goerli", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://testnet.era.zksync.dev" }, + { + "apiUrl": "https://block-explorer-api.sepolia.zksync.dev", + "verificationApiUrl": "https://explorer.sepolia.era.zksync.dev", + "bridgeUrl": "https://bridge.zksync.io", + "hostnames": [ + "https://sepolia.explorer.zksync.io" + ], + "icon": "/images/icons/zksync-arrows.svg", + "l1ExplorerUrl": "https://sepolia.etherscan.io", + "l2ChainId": 300, + "l2NetworkName": "zkSync Era Sepolia Testnet", + "l2WalletUrl": "https://portal.zksync.io/", + "maintenance": false, + "name": "sepolia", + "published": true, + "rpcUrl": "https://sepolia.era.zksync.dev" + }, { "apiUrl": "https://block-explorer-api.mainnet.zksync.io", "verificationApiUrl": "https://zksync2-mainnet-explorer.zksync.io", @@ -32,7 +48,6 @@ "l2WalletUrl": "https://portal.zksync.io/", "maintenance": false, "name": "mainnet", - "newProverUrl": "https://storage.googleapis.com/zksync-era-mainnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://mainnet.era.zksync.io" } diff --git a/packages/app/src/configs/staging.config.json b/packages/app/src/configs/staging.config.json index 17d966e752..7be5e57441 100644 --- a/packages/app/src/configs/staging.config.json +++ b/packages/app/src/configs/staging.config.json @@ -14,7 +14,6 @@ "l2WalletUrl": "https://goerli.staging-portal.zksync.dev/", "maintenance": false, "name": "goerli", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://testnet.era.zksync.dev" }, @@ -30,7 +29,6 @@ "l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet", "maintenance": false, "name": "sepolia", - "newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://sepolia.era.zksync.dev" }, @@ -47,7 +45,6 @@ "l2WalletUrl": "https://goerli-beta.staging-portal.zksync.dev/", "maintenance": false, "name": "goerli-beta", - "newProverUrl": "https://storage.googleapis.com/zksync-era-stage-proofs/proofs_fri", "published": true, "rpcUrl": "https://z2-dev-api.zksync.dev" }, @@ -65,7 +62,6 @@ "l2WalletUrl": "https://staging-portal.zksync.dev/", "maintenance": false, "name": "mainnet", - "newProverUrl": "https://storage.googleapis.com/zksync-era-mainnet-proofs/proofs_fri", "published": true, "rpcUrl": "https://mainnet.era.zksync.io" } diff --git a/packages/app/src/locales/en.json b/packages/app/src/locales/en.json index 26d044011f..f11d13509f 100644 --- a/packages/app/src/locales/en.json +++ b/packages/app/src/locales/en.json @@ -1,6 +1,5 @@ { "general": { - "checkHere": "Check here", "l2NetworkName": "zkSync Era", "l1NetworkName": "Ethereum" }, @@ -60,8 +59,7 @@ "executedAtTooltip": "Time when block was executed", "notYetExecuted": "Not yet executed", "notFound": "Not Found", - "notFoundHomePage": "We haven't had any blocks yet. Please, check again later.", - "newProverInfo": "This block was also proved with our upcoming new prover, Boojum. Want to learn more and verify yourself?" + "notFoundHomePage": "We haven't had any blocks yet. Please, check again later." }, "status": { "verified": "Verified", @@ -164,8 +162,7 @@ "unableToLoadMore": "Unable to load more", "tryAgain": "Try again ->" }, - "unknown": "Unknown", - "newProverInfo": "This transaction was also proved with our upcoming new prover, Boojum. Want to learn more and verify yourself?" + "unknown": "Unknown" }, "logs": { "name": "Name", @@ -273,8 +270,7 @@ "age": "Age", "notFound": "Not Found", "notFoundHomePage": "We haven't had any batches yet. Please, check again later.", - "transactionsShort": "txns", - "newProverInfo": "This batch was also proved with our upcoming new prover, Boojum. Want to learn more and verify yourself?" + "transactionsShort": "txns" }, "tooltipInfo": "Latest batches submitted to Ethereum Network", "status": { diff --git a/packages/app/src/locales/uk.json b/packages/app/src/locales/uk.json index 742d34ac0a..579c69d370 100644 --- a/packages/app/src/locales/uk.json +++ b/packages/app/src/locales/uk.json @@ -1,6 +1,5 @@ { "general": { - "checkHere": "Перевірити тут", "l2NetworkName": "zkSync Era", "l1NetworkName": "Ethereum" }, @@ -37,8 +36,7 @@ "notYetProven": "Ще не підтверджений", "executeTxHash": "Виконання хешу", "executedAt": "Виконаний", - "notYetExecuted": "Ще не виконано", - "newProverInfo": "Цей блок був також підтверджений нашим новим майбутнім прувером, Boojum. Бажаєте дізнатися більше та перевірити самостійно?" + "notYetExecuted": "Ще не виконано" }, "status": { "verified": "Перевірено", @@ -99,8 +97,7 @@ "showMore": "Показати більше транзакцій ->", "unableToLoadMore": "Неможливо завантажити більше", "tryAgain": "Спробуйте знову ->" - }, - "newProverInfo": "Ця транзакція була також підтверджена нашим новим майбутнім прувером, Boojum. Бажаєте дізнатися більше та перевірити самостійно?" + } }, "logs": { "address": "Адреса", diff --git a/packages/app/src/utils/constants.ts b/packages/app/src/utils/constants.ts index 66ad54e518..834827ee7b 100644 --- a/packages/app/src/utils/constants.ts +++ b/packages/app/src/utils/constants.ts @@ -2,8 +2,6 @@ import { checksumAddress } from "./formatters"; export const ETH_TOKEN_L2_ADDRESS = checksumAddress("0x000000000000000000000000000000000000800A"); -export const NEW_PROVER_CLI_URL = "https://github.com/matter-labs/era-boojum-validator-cli"; - export const PROXY_CONTRACT_IMPLEMENTATION_ABI = [ { inputs: [], diff --git a/packages/app/tests/composables/useTransaction.spec.ts b/packages/app/tests/composables/useTransaction.spec.ts index 089e865f93..6ca5c1927e 100644 --- a/packages/app/tests/composables/useTransaction.spec.ts +++ b/packages/app/tests/composables/useTransaction.spec.ts @@ -234,9 +234,7 @@ vi.mock("ohmyfetch", async () => { }, }); } - if (url.endsWith(".bin")) { - return Promise.resolve({}); - } + if (url.includes("/0x00000d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bcf")) { const error = new mod.FetchError("Not found"); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -602,7 +600,6 @@ describe("useTransaction:", () => { const { transaction, isRequestFailed, getByHash } = useTransaction({ currentNetwork: { value: { - newProverUrl: "http://prover.url", apiUrl: "http://api.url", }, }, diff --git a/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature b/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature index cf5f9e2ccc..c001055d46 100644 --- a/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature +++ b/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature @@ -92,8 +92,8 @@ Feature: Main Page Then Check the "" value is actual for "" switcher Examples: - | Value | Dropdown | - | zkSync Era Testnet | network | + | Value | Dropdown | + | zkSync Era Goerli Testnet | network | Scenario: Network stats is displayed Then Element with "text" "Network Stats" should be "visible" diff --git a/packages/app/tests/e2e/features/artifacts/artifactsSet3.feature b/packages/app/tests/e2e/features/artifacts/artifactsSet3.feature index 2520f2ec52..652968f457 100644 --- a/packages/app/tests/e2e/features/artifacts/artifactsSet3.feature +++ b/packages/app/tests/e2e/features/artifacts/artifactsSet3.feature @@ -65,7 +65,7 @@ Feature: Main Page @id249 @testnet @testnetSmokeSuite Scenario Outline: Verify table contains "" column name on Tokens page Given I go to page "/tokenlist" - And Table "Tokens" should have "5" rows + And Table "Tokens" should have "1" rows Then Column with "" name is visible Examples: @@ -77,7 +77,7 @@ Feature: Main Page @id249 @mainnet Scenario Outline: Verify table contains "" column name on Tokens page Given I go to page "/tokenlist" - # And Table "Tokens" should have "5" rows + # And Table "Tokens" should have "56" rows Then Column with "" name is visible Examples: diff --git a/packages/app/tests/e2e/features/redirection/redirectionSet3.feature b/packages/app/tests/e2e/features/redirection/redirectionSet3.feature index 9e8f9ed129..3d6c238a45 100644 --- a/packages/app/tests/e2e/features/redirection/redirectionSet3.feature +++ b/packages/app/tests/e2e/features/redirection/redirectionSet3.feature @@ -74,6 +74,6 @@ Feature: Redirection Then Current page have "" address Examples: - | Initial page | Network | url | - | /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet | - | /address/0x000000000000000000000000000000000000800A | zkSync Era Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli | + | Initial page | Network | url | + | /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet | + | /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli | diff --git a/packages/app/tests/mocks.ts b/packages/app/tests/mocks.ts index 109d5f2c51..33dd3858dd 100644 --- a/packages/app/tests/mocks.ts +++ b/packages/app/tests/mocks.ts @@ -47,7 +47,6 @@ export const GOERLI_NETWORK: NetworkConfig = { maintenance: false, published: true, hostnames: [], - newProverUrl: "", }; export const GOERLI_BETA_NETWORK: NetworkConfig = { name: "goerli-beta", @@ -62,7 +61,6 @@ export const GOERLI_BETA_NETWORK: NetworkConfig = { maintenance: false, published: true, hostnames: ["https://goerli-beta.staging-scan-v2.zksync.dev/"], - newProverUrl: "", }; export const useContractEventsMock = (params: any = {}) => {