-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:0xPolygon/polygon-docs into SPEC-170…
…-dev-deployment-update-for-review
- Loading branch information
Showing
45 changed files
with
485 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ node_modules/ | |
*.iml | ||
temp_dir/ | ||
package-lock.json | ||
package.json | ||
package.json | ||
meaningless.change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
const brokenLinkSVG = `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z"/></svg>`; | ||
const linkSVG = `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>`; | ||
|
||
function isAllowedEnvironment() { | ||
const currentUrl = window.location.href; | ||
return currentUrl.includes('127.0.0.1') || (currentUrl.startsWith('https://docs-dev') && currentUrl.includes("/learn/")) | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
if (!isAllowedEnvironment()) { | ||
return; // Exit early if not in allowed environment | ||
} | ||
const headerEllipsis = document.querySelector('.md-header__ellipsis'); | ||
|
||
if (headerEllipsis) { | ||
const walletButton = document.createElement('button'); | ||
walletButton.className = 'md-button md-button--primary md-header__button wallet-button'; | ||
walletButton.style.float = 'right'; | ||
walletButton.style.fontSize = 'small'; | ||
walletButton.style.lineHeight = "24px"; | ||
walletButton.addEventListener('click', handleWalletAction); | ||
|
||
const buttonText = document.createElement('span'); | ||
buttonText.className = 'wallet-button-text'; | ||
buttonText.textContent = 'Connect Wallet'; | ||
walletButton.appendChild(buttonText); | ||
|
||
const buttonIcon = document.createElement('span'); | ||
buttonIcon.className = 'wallet-button-icon'; | ||
buttonIcon.innerHTML = linkSVG | ||
buttonIcon.style.display = 'none'; | ||
walletButton.appendChild(buttonIcon); | ||
|
||
headerEllipsis.appendChild(walletButton); | ||
|
||
const style = document.createElement('style'); | ||
style.textContent = ` | ||
@media screen and (max-width: 465px) { | ||
.wallet-button-text { display: none; } | ||
.wallet-button-icon { display: inline !important; } | ||
} | ||
`; | ||
document.head.appendChild(style); | ||
|
||
const savedAddress = localStorage.getItem('walletAddress'); | ||
if (savedAddress) { | ||
updateButtonState(true, savedAddress); | ||
} | ||
} | ||
// const learnTab = Array.from(document.querySelectorAll('.md-tabs__link')).find(el => el.textContent.includes('Learn')); | ||
// if (learnTab) { | ||
// learnTab.textContent = learnTab.textContent.replace('Learn', 'Learn (beta)'); | ||
// } | ||
}); | ||
|
||
async function handleWalletAction() { | ||
const button = document.querySelector('.wallet-button'); | ||
const buttonText = button.querySelector('.wallet-button-text'); | ||
if (buttonText.textContent.startsWith('Connect')) { | ||
await connectWallet(); | ||
} else { | ||
await disconnectWallet(); | ||
} | ||
} | ||
|
||
async function connectWallet() { | ||
if (typeof window.ethereum !== 'undefined') { | ||
try { | ||
const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); | ||
console.log('Wallet connected successfully'); | ||
localStorage.setItem('walletAddress', accounts[0]); | ||
updateButtonState(true, accounts[0]); | ||
} catch (error) { | ||
console.error('Failed to connect wallet:', error); | ||
updateButtonState(false); | ||
} | ||
} else { | ||
console.log('Please install MetaMask or another Ethereum wallet'); | ||
alert('Please install MetaMask or another Ethereum wallet'); | ||
} | ||
} | ||
|
||
async function disconnectWallet() { | ||
console.log('Wallet disconnected'); | ||
localStorage.removeItem('walletAddress'); | ||
updateButtonState(false); | ||
} | ||
|
||
function updateButtonState(connected, address = '') { | ||
const button = document.querySelector('.wallet-button'); | ||
const buttonText = button.querySelector('.wallet-button-text'); | ||
const buttonIcon = button.querySelector('.wallet-button-icon'); | ||
if (button) { | ||
if (connected) { | ||
const abbreviatedAddress = `${address.slice(0, 4)}..${address.slice(-4)}`; | ||
buttonText.textContent = `Disconnect ${abbreviatedAddress}`; | ||
buttonIcon.innerHTML = brokenLinkSVG; | ||
button.classList.remove('md-button--primary'); | ||
button.classList.add('md-button--accent'); | ||
} else { | ||
buttonText.textContent = 'Connect Wallet'; | ||
buttonIcon.innerHTML = linkSVG; | ||
button.classList.add('md-button--primary'); | ||
button.classList.remove('md-button--accent'); | ||
} | ||
} | ||
} | ||
|
||
// Listen for account changes | ||
if (typeof window.ethereum !== 'undefined') { | ||
window.ethereum.on('accountsChanged', function (accounts) { | ||
if (accounts.length === 0) { | ||
// User disconnected their wallet | ||
disconnectWallet(); | ||
} else { | ||
// User switched to a different account | ||
localStorage.setItem('walletAddress', accounts[0]); | ||
updateButtonState(true, accounts[0]); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
The latest CDK release has two modes: | ||
|
||
1. The CDK rollup/validium mode with full execution proofs is the first mode for release. | ||
2. The CDK sovereign chain mode with pessimistic proofs, and no full execution proofs, is coming shortly after. | ||
|
||
This document details the full stack components for the first mode of release: CDK with full execution proofs. | ||
|
||
## CDK stack with full execution proofs (FEP) | ||
|
||
In the CDK with full execution proofs release, any zkEVM components can be considered as part of a CDK stack in rollup mode. | ||
|
||
The following table lists the components and where you can find them for CDK rollup and validium stacks. You will notice only small differences in the component makeup of the two stacks; differences which are now mostly use case specific. | ||
|
||
| Component | CDK rollup (FEP) | CDK validium (FEP) | Notes | | ||
| --- | --- | --- | --- | | ||
| Node = RPC and sequencer | <a href=https://github.com/0xPolygonHermez/cdk-erigon>cdk-erigon</a> | <a href=https://github.com/0xPolygonHermez/cdk-erigon>cdk-erigon</a> | Customizable but usually sequencer=1 node, multiple for RPC | | ||
| Data availability | None | <a href=https://github.com/0xPolygon/cdk-data-availability>cdk-data-availability</a> | | | ||
| Contracts | <a href=https://github.com/0xPolygonHermez/zkevm-contracts>zkevm-contracts</a> | <a href=https://github.com/0xPolygonHermez/zkevm-contracts>zkevm-contracts</a> | Same code for both: 8.0.0-rc.2-fork.12 | | ||
| Data streamer | <a href=https://github.com/0xPolygon/zkevm-data-streamer>zkevm-data-streamer</a> | <a href=https://github.com/0xPolygon/zkevm-data-streamer>zkevm-data-streamer</a> | Same code for both | | ||
| CLI | <a href=https://github.com/0xPolygon/cdk>CLI included</a> | <a href=https://github.com/0xPolygon/cdk>CLI included</a> | Same code for both | | ||
| Sequence sender | <a href=https://github.com/0xPolygon/cdk>Sequence sender included</a> | <a href=https://github.com/0xPolygon/cdk>Sequence sender included</a> | Same code for both | | ||
| Aggregator | <a href=https://github.com/0xPolygon/cdk>Aggregator included</a> | <a href=https://github.com/0xPolygon/cdk>Aggregator included</a> | Same code for both | | ||
| Tx pool manager | <a href=https://github.com/0xPolygon/zkevm-pool-manager>zkevm-pool-manager | <a href=https://github.com/0xPolygon/zkevm-pool-manager>zkevm-pool-manager | Same code for both | | ||
| Prover | <a href=https://github.com/0xPolygonHermez/zkevm-prover>zkevm-prover</a> | <a href=https://github.com/0xPolygonHermez/zkevm-prover>zkevm-prover</a> | Same code for both - wip | | ||
| Bridge service | <a href=https://github.com/0xPolygonHermez/zkevm-bridge-service>zkevm-bridge-service</a> | <a href=https://portal.polygon.technology/>Polygon Portal</a> | tbc | | ||
| Bridge UI | <a href=https://portal.polygon.technology/>Polygon Portal</a> | <a href=https://portal.polygon.technology/>Polygon Portal</a> | Same UI for both | | ||
| Blockscout | <a href=https://github.com/0xPolygonHermez/blockscout>blockscout</a> | <a href=https://github.com/0xPolygonHermez/blockscout>blockscout</a> | Same code for both | | ||
|
||
!!! important | ||
For specific release tags, please reference the [version matrix document](version-matrix.md). | ||
|
||
## CDK stack with pessimistic proofs | ||
|
||
The CDK with pessimistic proofs release follows on shortly after the CDK FEP release. | ||
|
||
!!! tip | ||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
--- | ||
comments: true | ||
hide: | ||
- toc | ||
--- | ||
|
||
## CDK component versions/releases | ||
|
||
The table below shows the version compatibility for CDK releases and related components. | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>CDK version</th> | ||
<th>Fork ID</th> | ||
<th>Equivalent zkEVM node</th> | ||
<th>CDK validium node</th> | ||
<th>CDK data<br>availability</th> | ||
<th>zkEVM node</th> | ||
<th>ZK-EVM prover</th> | ||
<th>Contracts</th> | ||
<th>Bridge</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<!-- | ||
<tr> | ||
<td>Rollup</td> | ||
<td colspan="7">Follow <a href="https://github.com/0xPolygonHermez#testnetmainnet-versions"> zkEVM </a></br><i>Disclaimer - These versions are intended for permissionless nodes</i> </td> | ||
</tr>--> | ||
<tr> | ||
<td>CDK Elderberry 2 Release </td> | ||
<td>9</td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.4">v0.6.4 Elderberry 2</a></td> | ||
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-validium-node/0.6.7-cdk.1/images/sha256-dafb15f9355331b4b7174f47ac416b275915ff24a9ed89c211c7c15c8adfc6b8?context=explore">0.6.7+cdk.1</a> </td> | ||
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-data-availability/0.0.7/images/sha256-17590789a831259d7a07d8a042ea87e381c5708dec3a7daef6f3f782f50b2c00?context=explore">v0.0.7</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.4">v0.6.4 </a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v6.0.0">v6.0.0</a></td> | ||
<td> <a href="https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v6.0.0-rc.1-fork.9">v6.0.0</a></td> | ||
<td><a href="https://hub.docker.com/layers/hermeznetwork/zkevm-bridge-service/v0.4.2-cdk.1/images/sha256-f22ad8c9ad058c7a97a3d38f53cac5b1053858916523b96211d33ae40a9b45f8?context=explore">v0.4.2-cdk.1</a></td> | ||
</tr> | ||
<!-- <td>CDK Elderberry 1 Release </td> | ||
<td>8</td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.2">v0.6.2 Elderberry</a></td> | ||
<td><a href="https://github.com/0xPolygon/cdk-validium-node/releases/tag/v0.6.2%2Bcdk4">0.6.2+cdk.4</a> </td> | ||
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-data-availability/0.0.6-hotfix1/images/sha256-e95ef2cd9110aff8acdd29065f407f04ea6179f71a7848d78eaf0dd73c858207?context=explore">v0.0.6-hotfix1</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v5.0.7">v5.0.7</a></td> | ||
<td> <a href="https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v5.0.1-rc.2-fork.8">v5.0.1</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://polygontechnology.notion.site/Instructions-zkEVM-Mainnet-Beta-Node-v0-5-7-Prover-v4-0-4-8f5b9d8e2f6a4048b21c608b49a93376" target="_blank" rel="noopener noreferrer">CDK-Etrog Release</a>- <br>BETA TESTING</td> | ||
<td>7</td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.13">v0.5.13 </a>(Etrog+uLxLy)</td> | ||
<td><a href="https://github.com/0xPolygon/cdk-validium-node/releases/tag/v0.5.13%2Bcdk.10">v0.5.13+cdk.10</a> </td> | ||
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-data-availability/0.0.6-hotfix1/images/sha256-e95ef2cd9110aff8acdd29065f407f04ea6179f71a7848d78eaf0dd73c858207?context=explore">v0.0.6-hotfix1</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v4.0.19">v4.0.19</a></td> | ||
<td> <a href="https://github.com/0xPolygonHermez/zkevm-rom/tree/v4.0.0-fork.7">v4.0.0</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td> | ||
</tr> | ||
<tr> | ||
<td>Upgraded validium</td> | ||
<td>6</td> | ||
<td>0.4.2</td> | ||
<td><a href="https://github.com/0xPolygon/cdk-validium-node/releases/tag/v0.0.3-hotfix6">v0.0.3-hotfix6</a></td> | ||
<td>v0.0.3</td> | ||
<td>zkevm-prover<br>@3.0.2<br>Config files version 3.0.0-RC3-fork.6</td> | ||
<td><a href="https://github.com/0xPolygon/cdk-validium-contracts/releases/tag/v0.0.2">v0.0.2</a></td> | ||
<td>v0.3.2-RC1</td> | ||
</tr>--> | ||
</tbody> | ||
</table> | ||
|
||
### Migrating | ||
|
||
- Anyone on earlier versions, we recommend going straight to fork ID 9. | ||
|
||
<!-- | ||
## zkEVM | ||
The table below shows the version compatibility for Polygon zkEVM releases. | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Node </th> | ||
<th>Bridge</th> | ||
<th>Prover</th> | ||
<th>Fork ID</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.4">v0.6.4 </a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v6.0.0">v6.0.0</a></td> | ||
<td>Mainnet & Cardona: 4-9 <br>Testnet (Goerli): 1-6</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.2">v0.6.2 </a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v5.0.7">v5.0.7</a></td> | ||
<td>Mainnet & Cardona: 4-8. <br>Testnet (Goerli): 1-6</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.13">v0.5.13</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v4.0.19">v4.0.19</a></td> | ||
<td>Mainnet & Cardona: 4-7. <br>Testnet (Goerli): 1-6</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/v0.4.0">v0.4.0</a></td> | ||
<td>v0.3.0</td> | ||
<td>v3.0.2</td> | ||
<td rowspan="2">Testnet: 1-6<br>Mainnet: 4-6</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/v0.3.3">v0.3.3</a></td> | ||
<td>v0.2.0</td> | ||
<td>v3.0.0</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/v0.3.1">v0.3.1</a> </td> | ||
<td> v0.2.0</td> | ||
<td>v2.2.2</td> | ||
<td>Testnet: <br>1 - 5 Mainnet: 4-5 </td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
--> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.