Skip to content

Commit

Permalink
Merge branch 'main' into fix/bridge-ui--hotfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK authored May 28, 2024
2 parents 97dbc02 + 9e6449b commit a06c542
Show file tree
Hide file tree
Showing 52 changed files with 562 additions and 599 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packages/branding": "0.4.0",
"packages/bridge-ui": "2.11.0",
"packages/docs-site": "1.4.1",
"packages/docs-site": "1.6.1",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.5.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
26 changes: 26 additions & 0 deletions packages/docs-site/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## [1.6.1](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.6.0...docs-site-v1.6.1) (2024-05-27)


### Bug Fixes

* **docs-site:** fix broken link ([#17381](https://github.com/taikoxyz/taiko-mono/issues/17381)) ([1d63635](https://github.com/taikoxyz/taiko-mono/commit/1d63635a9f2ae2e1fd8107e3118a03d93b89051d))

## [1.6.0](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.5.0...docs-site-v1.6.0) (2024-05-27)


### Features

* **docs-site:** update working on what is taiko ([#17371](https://github.com/taikoxyz/taiko-mono/issues/17371)) ([72a72bd](https://github.com/taikoxyz/taiko-mono/commit/72a72bd4f37b7c6f9761e175a371e0d46abd5169))

## [1.5.0](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.4.1...docs-site-v1.5.0) (2024-05-27)


### Features

* **docs-site:** add a few more resources ([#17366](https://github.com/taikoxyz/taiko-mono/issues/17366)) ([868b282](https://github.com/taikoxyz/taiko-mono/commit/868b2826e0a0b1bbf748d1628ba74fb065751c50))


### Bug Fixes

* **docs-site:** updates to proposer and prover guides ([#17369](https://github.com/taikoxyz/taiko-mono/issues/17369)) ([51ed6a0](https://github.com/taikoxyz/taiko-mono/commit/51ed6a05ab87fb4910941ec2d897aaf29e755458))

## [1.4.1](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.4.0...docs-site-v1.4.1) (2024-05-27)


Expand Down
10 changes: 5 additions & 5 deletions packages/docs-site/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ export default defineConfig({
link: "/core-concepts/based-sequencing/",
},
{
label: "Contestable rollups",
label: "Contestable rollups (BCR)",
link: "/core-concepts/contestable-rollups/",
},
{
label: "Booster rollups",
label: "Booster rollups (BBR)",
link: "/core-concepts/booster-rollups/",
},
{ label: "Multi-proofs", link: "/core-concepts/multi-proofs/" },
Expand Down Expand Up @@ -142,15 +142,15 @@ export default defineConfig({
link: "/guides/node-operators/run-an-ethereum-testnet-node/",
},
{
label: "Build a Taiko node from Source",
label: "Build a Taiko node from source",
link: "/guides/node-operators/build-a-taiko-node-from-source/",
},
{
label: "Run a Taiko mainnet node from Source",
label: "Run a Taiko mainnet node from source",
link: "/guides/node-operators/run-a-mainnet-taiko-node-from-source/",
},
{
label: "Run a Taiko testnet node from Source",
label: "Run a Taiko testnet node from source",
link: "/guides/node-operators/run-a-testnet-taiko-node-from-source/",
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-site/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docs-site",
"type": "module",
"version": "1.4.1",
"version": "1.6.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ title: Contestable rollups
description: Core concept page for "Contestable rollups".
---

The current Taiko mainnet and testnet are both configured as a based contestable rollup (BCR).

Check out our blog post on the [Based Contestable Rollup (BCR): A configurable, multi-proof rollup design](https://taiko.mirror.xyz/Z4I5ZhreGkyfdaL5I9P0Rj0DNX4zaWFmcws-0CVMJ2A).
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Multi-proofs
description: Core concept page for "Multi-proofs".
---

Taiko supports multi-proofs through a mixture of zkVMs, TEE, and guardian proofs. Check out our blog post on zkVMs [here](https://taiko.mirror.xyz/e_5GeGGFJIrOxqvXOfzY6HmWcRjCjRyG0NQF1zbNpNQ) and a Twitter thread on our Raiko architecture [here](https://x.com/taikoxyz/status/1791201812768600209).

## Proving Taiko blocks

The purpose of proving blocks is to give certainty to bridges about the execution that happened in the rollup. To rely on some state that happened inside of the rollup, a bridge will want a proof that everything was done correctly. On Taiko you can run a node as a prover and prove blocks, permissionlessly. This means that you can examine the proposed blocks on the TaikoL1 contract, and generate proofs for them. Currently, any prover can create proofs for proposed blocks. This means that the number of "state transitions" has no upper bound, because we don't know what is the correct state transition yet. Only first prover with a valid proof of the correct state transition will receive the reward of `ETH` (and possibly any `ERC20` or even NFTs if the Prover pool implementation favors it).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Core concept page for "What is Taiko?".

Ethereum is too expensive. We believe in Ethereum's core properties (e.g., censorship-resistant, permissionless, secure). We also believe that rollups should **extend** (not augment) these properties.

Thus, we are building a [based rollup](/core-concepts/based-sequencing) which makes Ethereum cheaper while maintaining its properties:
Taiko is a [based rollup](/core-concepts/based-sequencing) which makes Ethereum cheaper while maintaining its properties:

- [Based contestable rollup](/core-concepts/contestable-rollups): A configurable rollup to reduce transaction fees on Ethereum.
- [Based booster rollup](/core-concepts/booster-rollups): An innovative approach to **native L1 scaling**.
Expand All @@ -29,10 +29,8 @@ Taiko is a **fully open source, permissionless, Ethereum-equivalent ZK-Rollup**.

### Frontends

- [Bridge UI](https://bridge.hekla.taiko.xyz)
- [Blockscout block explorer](https://explorer.hekla.taiko.xyz)
- [Network + Guardian Prover status page](https://status.taiko.xyz)
- [Fork of Uniswap v3 UI](https://swap.hekla.taiko.xyz)
- [Bridge UI](https://bridge.taiko.xyz)
- [Network status page](https://status.taiko.xyz)
- [Main homepage](https://taiko.xyz) + [this documentation site](https://docs.taiko.xyz)
- [Geth fork diff page](https://geth.taiko.xyz)

Expand All @@ -55,5 +53,5 @@ Taiko is a **fully open source, permissionless, Ethereum-equivalent ZK-Rollup**.
- [Taiko protocol smart contracts](https://github.com/taikoxyz/taiko-mono)
- [Taiko geth](https://github.com/taikoxyz/taiko-geth)
- [Taiko client](https://github.com/taikoxyz/taiko-client)
- [Raiko client](https://github.com/taikoxyz/raiko)
- [Raiko](https://github.com/taikoxyz/raiko)
- [Simple taiko node](https://github.com/taikoxyz/simple-taiko-node)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
## Prerequisites

- You are already running a Taiko node [with Docker](/guides/node-operators/run-a-taiko-node-with-docker) or [from source](/guides/node-operators/build-a-taiko-node-from-source).
- You are able to receive prover bonds from your own prover or from [a community marketplace](https://dojonode.xyz/tatami).

{/*## Using `stn`
Expand All @@ -16,6 +17,10 @@ import { Aside, Steps } from '@astrojs/starlight/components';

## Using simple-taiko-node

<Aside>
These are the bare minimum required settings along with a functional Taiko node to run a proposer, feel free to customize the rest of the variables in the `.env` file as you see fit!
</Aside>

<Steps>

1. First, you will need to have a prover from <a href="https://dojonode.xyz/tatami" target="_blank">the community marketplace</a> or [run your own SGX prover](/guides/node-operators/enable-a-prover).
Expand All @@ -30,8 +35,4 @@ import { Aside, Steps } from '@astrojs/starlight/components';

6. Now that the proposer is configured properly, you can run it with `docker compose --profile proposer up -d`!

<Aside>
These are the bare minimum required settings along with a functional Taiko node to run a proposer, feel free to customize the rest of the variables in the .env file as you see fit!
</Aside>

</Steps>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Aside, Steps } from "@astrojs/starlight/components";
## Enable a prover with simple-taiko-node

<Aside>
The SGX registration process now occurs fully onchain! By registering through on-chain RA, TTKOh will be deposited to your prover's L1 Address.
These are the bare minimum required settings along with a functional Taiko node to run a proposer, feel free to customize the rest of the variables in the `.env` file as you see fit!
</Aside>

<Steps>
Expand All @@ -30,13 +30,15 @@ The SGX registration process now occurs fully onchain! By registering through on

6. You can then run your prover with `docker compose --profile prover up -d`!

<Aside>
These are the bare minimum required settings along with a functional Taiko node to run a proposer, feel free to customize the rest of the variables in the .env file as you see fit!
</Aside>

</Steps>

### Approve TaikoL1 as TTKOh spender
### Approve TaikoL1 as TKO spender (mainnet)

<Aside>
Coming soon, once TKO is available.
</Aside>

### Approve TaikoL1 as TTKOh spender (testnet)

You will need TTKOh deposited on the TaikoL1 contract to secure the bond for the proofs you generate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hero:
tagline: Guides, concepts, API references, and resources to help you build with Taiko.
actions:
- text: Deploy a contract
link: /guides/deploy-a-contract
link: /guides/app-developers/deploy-a-contract
icon: right-arrow
variant: primary
- text: Learn about Taiko
Expand Down
22 changes: 21 additions & 1 deletion packages/nfts/contracts/snaefell/SnaefellToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity 0.8.24;

import { ERC721EnumerableUpgradeable } from
"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";

import { MerkleWhitelist } from "./MerkleWhitelist.sol";

/// @title TaikoonToken
Expand All @@ -21,6 +20,7 @@ contract SnaefellToken is ERC721EnumerableUpgradeable, MerkleWhitelist {
error MAX_SUPPLY_REACHED();
error MINTER_NOT_WHITELISTED();
error TOKEN_NOT_MINTED();
error TOKEN_CANNOT_BE_TRANSFERRED();

/// @notice Contract initializer
/// @param _rootURI Base URI for the token metadata
Expand Down Expand Up @@ -100,4 +100,24 @@ contract SnaefellToken is ERC721EnumerableUpgradeable, MerkleWhitelist {
_mint(_to, tokenIds[i]);
}
}

/// @notice Allow minting, and block all other token transfers
/// @param to The address to transfer to
/// @param tokenId The token id to transfer
/// @param auth The authorizer of the transfer
function _update(
address to,
uint256 tokenId,
address auth
)
internal
virtual
override
returns (address)
{
if (_ownerOf(tokenId) != address(0)) {
revert TOKEN_CANNOT_BE_TRANSFERRED();
}
return super._update(to, tokenId, auth);
}
}
9 changes: 9 additions & 0 deletions packages/nfts/test/snaefell/SnaefellToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,13 @@ contract SnaefellTokenTest is Test {
assertEq(token.balanceOf(owner), 5);
assertEq(tokenIds.length, 5);
}

function test_revert_tokenCannotBeTransferred() public {
vm.startBroadcast(owner);
uint256[] memory tokenIds = token.mint(owner, 5);

vm.expectRevert();
token.transferFrom(owner, minters[0], tokenIds[0]);
vm.stopBroadcast();
}
}
15 changes: 11 additions & 4 deletions packages/protocol/contracts/L1/libs/LibProving.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ library LibProving {
struct Local {
TaikoData.SlotB b;
ITierProvider.Tier tier;
ITierProvider.Tier minTier;
bytes32 metaHash;
address assignedProver;
uint64 slot;
Expand Down Expand Up @@ -152,11 +153,17 @@ library LibProving {

// Retrieve the tier configurations. If the tier is not supported, the
// subsequent action will result in a revert.
local.tier =
ITierProvider(_resolver.resolve(LibStrings.B_TIER_PROVIDER, false)).getTier(_proof.tier);
ITierProvider tierProvider =
ITierProvider(_resolver.resolve(LibStrings.B_TIER_PROVIDER, false));

local.inProvingWindow =
!LibUtils.isPostDeadline(ts.timestamp, local.b.lastUnpausedAt, local.tier.provingWindow);
local.tier = tierProvider.getTier(_proof.tier);
local.minTier = tierProvider.getTier(_meta.minTier);

local.inProvingWindow = !LibUtils.isPostDeadline({
_tsTimestamp: ts.timestamp,
_lastUnpausedAt: local.b.lastUnpausedAt,
_windowMinutes: local.minTier.provingWindow
});

// Checks if only the assigned prover is permissioned to prove the block.
// The guardian prover is granted exclusive permission to prove only the first
Expand Down
9 changes: 6 additions & 3 deletions packages/protocol/deployments/mainnet-contract-logs-L1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- ens: `sam.based.taiko.eth`
- proxy: `0xEf9EaA1dd30a9AA1df01c36411b5F082aA65fBaa`
- impl: `0xF1cA1F1A068468E1dcF90dA6add185467de80943`
- impl: `0x9496502d7D121B3D5eF25cA6c58d4f7593398a17`
- owner: `admin.taiko.eth`
- names:
- taiko_token: `0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800`
Expand All @@ -34,6 +34,7 @@
- admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885`
- Upgraded from `0x9cA1Ab10c9fAc5153F8b78E67f03aAa69C9c6A15` to `0xF1cA1F1A068468E1dcF90dA6add185467de80943` @commit`b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f`
- `Init2()` called @tx`0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9`
- Upgraded from `0xF1cA1F1A068468E1dcF90dA6add185467de80943` to `0x9496502d7D121B3D5eF25cA6c58d4f7593398a17` @commit`e79a367ad` @tx`0xe1ef58455de0b0331228e487d54720290ed8a73f709d2146bd43330d4a360bd3`

#### taiko_token

Expand Down Expand Up @@ -145,7 +146,7 @@

- ens: `ram.based.taiko.eth`
- proxy: `0x579f40D0BE111b823962043702cabe6Aaa290780`
- impl: `0xF1cA1F1A068468E1dcF90dA6add185467de80943`
- impl: `0x8Af4669E3068Bae96b92cD73603f5D86beD07a9a`
- names:
- taiko_token: `0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800`
- signal_service: `0x9e0a24964e5397B566c1ed39258e21aB5E35C77C`
Expand All @@ -169,19 +170,21 @@
- register `chain_watchdog` on May 21 @tx`0xaed098ad0c93113e401f61358f963501f40a046c5b5b659a1610f10120a9a86b`
- register `prover_set` to `0x34f2B21107AfE3584949c184A1E6236FFDAC4f6F` @tx`0x252cd7fcb6e02a71c0770d00f2f2476d5dd469a4fb5df622fe7bf6280d8a4100`
- register `prover_set` to `0x500735343372Dd6c9B84dBc7a75babf4479742B9` @commit`fa481c1` @tx`0x02ed558762eae5f0a930ba4a1047a02d4a793ea48890268c32df04e882f138ff`
- Upgraded from `0xF1cA1F1A068468E1dcF90dA6add185467de80943` to `0x8Af4669E3068Bae96b92cD73603f5D86beD07a9a` @commit`e79a367ad` @tx`0xe1ef58455de0b0331228e487d54720290ed8a73f709d2146bd43330d4a360bd3`

#### taikoL1

- ens: `based.taiko.eth`
- proxy: `0x06a9Ab27c7e2255df1815E6CC0168d7755Feb19a`
- impl: `0xe0A5D394878723CEAEC8B993e04756DF1f4B44eF`
- impl: `0xa200c2268d77737a8Fd2CA1698dA6eeab2a85CEb`
- owner: `admin.taiko.eth`
- logs:
- deployed on May 1, 2024 @commit`56dddf2b6`
- Upgraded from `0x99Ba70E62cab0cB983e66F72330fBDDC11d85501` to `0x9fBBedBBcBb753E7214BE08381efE10d89D712fE` @commit`b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f`
- `Init2()` called and reset block hash to `0411D9F84A525864E0A7E8BB51667D49C6BF73820AF9E4BC76EA66ADB6BE8903` @tx`0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9`
- Upgraded from `0x9fBBedBBcBb753E7214BE08381efE10d89D712fE` to `0xe0A5D394878723CEAEC8B993e04756DF1f4B44eF` on May 21 @commit`c817e76d9` @tx`0xaed098ad0c93113e401f61358f963501f40a046c5b5b659a1610f10120a9a86b`
- `resetGenesisHash()` called to reset genesis block hash to `0x90bc60466882de9637e269e87abab53c9108cf9113188bc4f80bcfcb10e489b9` on May 22 @tx`0x5a60c5815947a199cc84e1bc75539e01a202597b20c1f87bd9d02f8be6453abd`
- Upgraded from `0xe0A5D394878723CEAEC8B993e04756DF1f4B44eF` to `0xa200c2268d77737a8Fd2CA1698dA6eeab2a85CEb` on May 27 @commit`06f97d6` @tx`0x187cc99e9bcf2a94f723cf52d85b74b79bdb3872681e2a3808cadbbc3ba301e2`

#### assignment_hook

Expand Down
4 changes: 3 additions & 1 deletion packages/protocol/script/config_dcap_sgx_verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ V3_QUOTE_BYTES=$V3_QUOTE_BYTES \
forge script script/SetDcapParams.s.sol:SetDcapParams \
--fork-url $FORK_URL \
--broadcast \
--evm-version cancun \
--ffi \
-vvvv \
--block-gas-limit 100000000 \
--private-key ${PRIVATE_KEY}
--private-key ${PRIVATE_KEY} \
--legacy
2 changes: 1 addition & 1 deletion packages/snaefell-ui/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PUBLIC_WALLETCONNECT_PROJECT_ID=fake
PUBLIC_IPFS_GATEWAY=https://taikoons.4everland.link/ipfs/
PUBLIC_IPFS_GATEWAY=https://taikonfts.4everland.link/ipfs/
PUBLIC_LAUNCH_DATE=2024-05-26T00:00:00
3 changes: 2 additions & 1 deletion packages/snaefell-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"build": "cd ../ui-lib && pnpm build && cd - && vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"svelte:check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand All @@ -19,6 +19,7 @@
"generate:abi": "cd ../nfts && pnpm compile && cd - && wagmi generate"
},
"devDependencies": {
"@taiko/ui-lib": "workspace:*",
"@chromatic-com/storybook": "^1.3.1",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { ResponsiveController } from '@taiko/ui-lib';
import { getContext } from 'svelte';
import { ResponsiveController } from '$components/core/ResponsiveController';
import { classNames } from '$lib/util/classNames';
import type { ITaikoonDetail } from '$stores/taikoonDetail';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { ResponsiveController } from '@taiko/ui-lib';
import { getAccount } from '@wagmi/core';
import { onDestroy, onMount } from 'svelte';
import { formatEther } from 'viem';
import { zeroAddress } from 'viem';
import { ResponsiveController } from '$components/core/ResponsiveController';
import { Spinner } from '$components/core/Spinner';
import { getChainImage } from '$lib/chain';
import { web3modal } from '$lib/connect';
Expand Down
Loading

0 comments on commit a06c542

Please sign in to comment.