Skip to content

Commit

Permalink
Merge branch 'main' into docs-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
swarna1101 authored Feb 18, 2025
2 parents deedef7 + adaf808 commit 631e81f
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages/bridge-ui": "2.13.0",
"packages/docs-site": "1.23.2",
"packages/docs-site": "1.23.3",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.6.1",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0
replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.12.1-0.20250218024440-838f65315354

replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/optimism v0.0.0-20250212013257-f7ccb8141f3c

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 h1:ymZR+Y88LOnA8i3Ke
github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082/go.mod h1:RHnIu3EFehrWX3JhFAMQSXD5uz7l0xaNroTzXrap7EQ=
github.com/taikoxyz/optimism v0.0.0-20250212013257-f7ccb8141f3c h1:LlZlD7Z4NZXa2dToHOefKOy67Ej1o3T+9Gicd/6Pgsk=
github.com/taikoxyz/optimism v0.0.0-20250212013257-f7ccb8141f3c/go.mod h1:V0VCkKtCzuaJH6qcL75SRcbdlakM9LhurMEJUhO6VXA=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0 h1:LEn6wBmEIJVH4RgAEb7ORbJMt9ajgvsmtgatxlqlO8E=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250218024440-838f65315354 h1:RgGN4gW9apclVJDM5M4ja2WKylkgygL9nLWFIE0debg=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250218024440-838f65315354/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/testcontainers/testcontainers-go v0.35.0 h1:uADsZpTKFAtp8SLK+hMwSaa+X+JiERHtd4sQAFmXeMo=
github.com/testcontainers/testcontainers-go v0.35.0/go.mod h1:oEVBj5zrfJTrgjwONs1SsRbnBtH9OKl+IGl3UMcr2B4=
Expand Down
7 changes: 7 additions & 0 deletions packages/docs-site/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.23.3](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.23.2...docs-site-v1.23.3) (2025-02-18)


### Bug Fixes

* **docs-site:** fix release version filter ([#18947](https://github.com/taikoxyz/taiko-mono/issues/18947)) ([0c501dc](https://github.com/taikoxyz/taiko-mono/commit/0c501dccfd8382a16ccf9b21d9b64415da690ed0))

## [1.23.2](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.23.1...docs-site-v1.23.2) (2025-02-14)


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.23.2",
"version": "1.23.3",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ It is **highly recommended** you use the latest software. You can find the lates

| Package | Release notes |
| :------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [protocol](https://github.com/taikoxyz/taiko-mono/tree/main/packages/protocol) | [![Github Release](https://img.shields.io/github/v/release/taikoxyz/taiko-mono?filter=protocol*&label=)](https://github.com/taikoxyz/taiko-mono/blob/main/packages/protocol/CHANGELOG.md) |
| [protocol](https://github.com/taikoxyz/taiko-mono/tree/main/packages/protocol) | [![Github Release](https://img.shields.io/github/v/release/taikoxyz/taiko-mono?filter=taiko-alethia-protocol*&label=)](https://github.com/taikoxyz/taiko-mono/blob/main/packages/protocol/CHANGELOG.md) |
| [taiko-geth](https://github.com/taikoxyz/taiko-geth) | [![GitHub Release](https://img.shields.io/github/v/release/taikoxyz/taiko-geth?label=)](https://github.com/taikoxyz/taiko-geth/blob/taiko/CHANGELOG.md) |
| [taiko-client](https://github.com/taikoxyz/taiko-mono/tree/main/packages/taiko-client) | [![GitHub Release](https://img.shields.io/github/v/release/taikoxyz/taiko-mono?filter=taiko-client*&label=)](https://github.com/taikoxyz/taiko-mono/blob/main/packages/taiko-client/CHANGELOG.md) |
| [taiko-client](https://github.com/taikoxyz/taiko-mono/tree/main/packages/taiko-client) | [![GitHub Release](https://img.shields.io/github/v/release/taikoxyz/taiko-mono?filter=taiko-alethia-client*&label=)](https://github.com/taikoxyz/taiko-mono/blob/main/packages/taiko-client/CHANGELOG.md) |
| [simple-taiko-node](https://github.com/taikoxyz/simple-taiko-node/tree/main) | [![Github Release](https://img.shields.io/github/v/release/taikoxyz/simple-taiko-node?label=)](https://github.com/taikoxyz/simple-taiko-node/blob/main/CHANGELOG.md) |
| [raiko](https://github.com/taikoxyz/raiko/tree/main) | [![Github Release](https://img.shields.io/github/v/release/taikoxyz/raiko?label=)](https://github.com/taikoxyz/raiko/blob/main/CHANGELOG.md) |

Expand Down
4 changes: 4 additions & 0 deletions packages/protocol/contracts/layer1/based/ITaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ interface ITaikoInbox {
uint32 byteOffset;
// The byte size of the blob.
uint32 byteSize;
// The block number when the blob was created.
uint64 createdIn;
}

struct BatchParams {
Expand All @@ -68,6 +70,7 @@ interface ITaikoInbox {
bytes32 extraData;
address coinbase;
uint64 proposedIn; // Used by node/client
uint64 blobCreatedIn;
uint32 blobByteOffset;
uint32 blobByteSize;
uint32 gasLimit;
Expand Down Expand Up @@ -271,6 +274,7 @@ interface ITaikoInbox {
error EtherNotPaidAsBond();
error ForkNotActivated();
error InsufficientBond();
error InvalidBlobCreatedIn();
error InvalidBlobParams();
error InvalidGenesisBlockHash();
error InvalidParams();
Expand Down
7 changes: 7 additions & 0 deletions packages/protocol/contracts/layer1/based/TaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, I

// blob hashes are only accepted if the caller is trusted.
require(params.blobParams.blobHashes.length == 0, InvalidBlobParams());

require(params.blobParams.createdIn == 0, InvalidBlobCreatedIn());
params.blobParams.createdIn = uint64(block.number);
} else {
require(msg.sender == inboxWrapper, NotInboxWrapper());
require(params.proposer != address(0), CustomProposerMissing());
require(params.blobParams.createdIn != 0, InvalidBlobCreatedIn());
}

if (params.coinbase == address(0)) {
Expand All @@ -118,6 +122,8 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, I
require(params.blobParams.numBlobs == 0, InvalidBlobParams());
require(params.blobParams.firstBlobIndex == 0, InvalidBlobParams());
}
} else {
params.blobParams.createdIn = 0;
}

// Keep track of last batch's information.
Expand Down Expand Up @@ -151,6 +157,7 @@ abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, I
extraData: bytes32(uint256(config.baseFeeConfig.sharingPctg)),
coinbase: params.coinbase,
proposedIn: uint64(block.number),
blobCreatedIn: params.blobParams.createdIn,
blobByteOffset: params.blobParams.byteOffset,
blobByteSize: params.blobParams.byteSize,
gasLimit: config.blockMaxGasLimit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ contract ForcedInclusionStore is EssentialContract, IForcedInclusionStore {
feeInGwei: uint64(msg.value / 1 gwei),
createdAtBatchId: _nextBatchId(),
blobByteOffset: blobByteOffset,
blobByteSize: blobByteSize
blobByteSize: blobByteSize,
blobCreatedIn: uint64(block.number)
});

queue[tail++] = inclusion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface IForcedInclusionStore {
uint64 createdAtBatchId;
uint32 blobByteOffset;
uint32 blobByteSize;
uint64 blobCreatedIn;
}

/// @dev Event emitted when a forced inclusion is stored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ contract TaikoWrapper is EssentialContract, IProposeBatch {
error InvalidBlobHash();
error InvalidBlobByteOffset();
error InvalidBlobByteSize();
error InvalidBlobCreatedIn();
error OldestForcedInclusionDue();

uint16 public constant MIN_TXS_PER_FORCED_INCLUSION = 512;
Expand Down Expand Up @@ -116,6 +117,7 @@ contract TaikoWrapper is EssentialContract, IProposeBatch {
require(p.blobParams.blobHashes[0] == inclusion.blobHash, InvalidBlobHash());
require(p.blobParams.byteOffset == inclusion.blobByteOffset, InvalidBlobByteOffset());
require(p.blobParams.byteSize == inclusion.blobByteSize, InvalidBlobByteSize());
require(p.blobParams.createdIn == inclusion.blobCreatedIn, InvalidBlobCreatedIn());

emit ForcedInclusionProcessed(inclusion);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/protocol/deployments/hekla-contract-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

### tierRouter

- impl: `0x6A666F2C56a6559dB0BD8866Bd0c0dDB9ec03c66`
- impl: `0x426F0674a80314D8862348F1482C3F7B4a9C64A4.`
- logs:
- deployed on Jun 10, 2024 at commit `d5965bb`
- upgraded on Jun 14, 2024 at commit `cc10b04`
Expand All @@ -168,6 +168,7 @@
- upgraded on Oct 30, 2024 at commit `63455f9`
- upgraded on Nov 4, 2024 at commit `90b2693`
- upgraded on Nov 4, 2024 at commit `8e00612`
- upgraded on Feb 17, 2025 at commit `51090ba`

### prover_set

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ contract ForcedInclusionStoreTest is ForcedInclusionStoreTestBase {
uint64 feeInGwei,
uint64 createdAt,
uint32 blobByteOffset,
uint32 blobByteSize
uint32 blobByteSize,
uint64 blobCreatedIn
) = store.queue(store.tail() - 1);

assertEq(blobHash, bytes32(uint256(i + 1))); // = blobIndex + 1
assertEq(createdAt, uint64(block.timestamp));
assertEq(feeInGwei, _feeInGwei);
assertEq(blobByteOffset, 0);
assertEq(blobByteSize, 1024);
assertEq(blobCreatedIn, uint64(block.number));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ contract MockTaikoInbox is EssentialContract {
lastBlockId: 0,
lastBlockTimestamp: 0,
proposedIn: uint64(block.number),
blobCreatedIn: 0,
anchorBlockId: params.anchorBlockId,
anchorBlockHash: bytes32(0), // Mock value
blocks: params.blocks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func createPayloadAndSetHead(
} else if header != nil {
// Update the l1Origin and headL1Origin cursor for that preconfirmed block.
meta.L1Origin.L2BlockHash = header.Hash()
if _, err := rpc.L2.UpdateL1Origin(ctx, meta.L1Origin); err != nil {
if _, err := rpc.L2Engine.UpdateL1Origin(ctx, meta.L1Origin); err != nil {
return nil, fmt.Errorf("failed to update L1 origin: %w", err)
}
if _, err := rpc.L2.SetHeadL1Origin(ctx, meta.L1Origin.BlockID); err != nil {
if _, err := rpc.L2Engine.SetHeadL1Origin(ctx, meta.L1Origin.BlockID); err != nil {
return nil, fmt.Errorf("failed to write head L1 origin: %w", err)
}

Expand Down
3 changes: 2 additions & 1 deletion packages/taiko-client/driver/preconf_blocks/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -37,7 +38,7 @@ type ExecutableData struct {
Number uint64 `json:"blockNumber"`
GasLimit uint64 `json:"gasLimit"`
Timestamp uint64 `json:"timestamp"`
Transactions []byte `json:"transactions"`
Transactions hexutil.Bytes `json:"transactions"`
}

// BuildPreconfBlockRequestBody represents a request body when handling
Expand Down
23 changes: 23 additions & 0 deletions packages/taiko-client/pkg/rpc/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/ethereum/go-ethereum/beacon/engine"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/rpc"
Expand Down Expand Up @@ -131,3 +132,25 @@ func (c *EngineClient) TxPoolContentWithMinTip(
}
return result, nil
}

// UpdateL1Origin sets the L2 block's corresponding L1 origin.
func (c *EngineClient) UpdateL1Origin(ctx context.Context, l1Origin *rawdb.L1Origin) (*rawdb.L1Origin, error) {
var res *rawdb.L1Origin

if err := c.CallContext(ctx, &res, "taikoAuth_updateL1Origin", l1Origin); err != nil {
return nil, err
}

return res, nil
}

// SetHeadL1Origin sets the latest L2 block's corresponding L1 origin.
func (c *EngineClient) SetHeadL1Origin(ctx context.Context, blockID *big.Int) (*big.Int, error) {
var res *big.Int

if err := c.CallContext(ctx, &res, "taikoAuth_setHeadL1Origin", blockID); err != nil {
return nil, err
}

return res, nil
}

0 comments on commit 631e81f

Please sign in to comment.