Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): preconfs #18089

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
0cc1a08
wip
cyberhorsey Sep 13, 2024
647f32d
wip
cyberhorsey Sep 13, 2024
cc76577
wip
cyberhorsey Sep 13, 2024
32479ab
Merge branch 'main' into preconfs
cyberhorsey Sep 13, 2024
835c801
.
cyberhorsey Sep 13, 2024
b5b4d2d
.
cyberhorsey Sep 13, 2024
c62acb4
dockefile lint
cyberhorsey Sep 13, 2024
12dd8f7
forge fmt & update contract layout tables
cyberhorsey Sep 13, 2024
ffd10e4
fix deps
cyberhorsey Sep 13, 2024
854719f
.
cyberhorsey Sep 13, 2024
9a65b96
forge fmt & update contract layout tables
cyberhorsey Sep 13, 2024
958f779
copy out bridge
cyberhorsey Sep 13, 2024
b5bdfc5
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Sep 13, 2024
39b059c
protocl config
cyberhorsey Sep 13, 2024
abdebc2
forge fmt & update contract layout tables
cyberhorsey Sep 13, 2024
21989ec
remove l1height check for reorg
cyberhorsey Sep 16, 2024
94cc5a3
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Sep 16, 2024
6cc1dde
preconftaskmanager registry + api updates
cyberhorsey Oct 2, 2024
4d9dac5
Merge branch 'main' into preconfs
cyberhorsey Oct 2, 2024
a1a9369
lints
cyberhorsey Oct 2, 2024
5234e4a
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Oct 2, 2024
9074cbb
go fmt
cyberhorsey Oct 2, 2024
4583462
fix out of range bug
cyberhorsey Oct 2, 2024
3306c11
Merge branch 'main' into preconfs
cyberhorsey Oct 2, 2024
5e6f375
try removing tags
cyberhorsey Oct 2, 2024
e7d68d3
try this tag
cyberhorsey Oct 2, 2024
9cfd959
add install jq
Oct 2, 2024
62677f8
updates
cyberhorsey Oct 2, 2024
31eaaa4
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Oct 2, 2024
0aec63d
Merge branch 'main' into preconfs
cyberhorsey Oct 2, 2024
66e2447
force push
cyberhorsey Oct 2, 2024
b7fcae7
try use head
RogerLamTd Oct 2, 2024
f84a0a3
set gas tip cap
cyberhorsey Oct 2, 2024
2db1c01
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Oct 2, 2024
f647179
add .preconferAddress
cyberhorsey Oct 4, 2024
0754b7f
big int
cyberhorsey Oct 7, 2024
9cd665b
Merge branch 'main' into preconfs
cyberhorsey Oct 7, 2024
6164871
go mod tidy
cyberhorsey Oct 7, 2024
8f77172
remove 0xff
cyberhorsey Oct 8, 2024
af9a1ad
.
cyberhorsey Oct 8, 2024
db75702
rm gastipcap
cyberhorsey Oct 8, 2024
644fbde
temp fix
cyberhorsey Oct 8, 2024
e80fcce
update ipreconftaskmanager + bindings, add loookahead creation
cyberhorsey Oct 10, 2024
b51706e
.
cyberhorsey Oct 14, 2024
01779db
lookahead pusher pk
cyberhorsey Oct 14, 2024
5794ec9
Merge branch 'main' into preconfs
cyberhorsey Oct 14, 2024
fb25618
forge fmt & update contract layout tables
cyberhorsey Oct 14, 2024
ca019f7
beacon
cyberhorsey Oct 14, 2024
20c5736
Merge branch 'preconfs' of github.com:taikoxyz/taiko-mono into preconfs
cyberhorsey Oct 14, 2024
41ed9de
ret error
cyberhorsey Oct 14, 2024
9f8c995
Go mod tidy
cyberhorsey Oct 14, 2024
351ee1d
rm lookaehad pushing for now
cyberhorsey Oct 14, 2024
b42f2cd
rm spew
cyberhorsey Oct 15, 2024
b9aa84f
change blobstorage to conform to standard blob api
cyberhorsey Oct 15, 2024
4912932
one blobHash
cyberhorsey Oct 15, 2024
a9c6d83
lint + workflow for blobstorage
cyberhorsey Oct 15, 2024
5e24f2f
rm lint job
cyberhorsey Oct 15, 2024
2600ded
lint
cyberhorsey Oct 15, 2024
69e11a6
add timeout to relayer lint
cyberhorsey Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/blobstorage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Blobstorage

on:
push:
branches: [main]
paths:
- "packages/blobstorage/**"
- "go.mod"
- "go.sum"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/blobstorage/**"
- "go.mod"
- "go.sum"

jobs:
push-blobstorage-docker-image:
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [arc-runner-set]

steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Login to GAR
uses: docker/login-action@v3
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
us-docker.pkg.dev/evmchain/images/blobstorage
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PACKAGE=blobstorage
7 changes: 7 additions & 0 deletions .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- "taiko-client-v*"
paths:
- "packages/taiko-client/**"
pull_request:
paths:
- "packages/taiko-client/**"
- "go.mod"
- "go.sum"

env:
REGISTRY_IMAGE: us-docker.pkg.dev/evmchain/images/taiko-client
Expand All @@ -33,6 +38,8 @@ jobs:

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Login to GAR
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9",
"solidity.compileUsingRemoteVersion": "v0.8.25+commit.b61c2a91",
"solidity.formatter": "forge",
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
Expand Down
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/cyberhorsey/webutils v0.0.0-20230314183728-56890c6ddbe7
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0
github.com/dgraph-io/badger/v4 v4.2.0
github.com/ethereum-optimism/optimism v1.7.4
github.com/ethereum/go-ethereum v1.14.11
github.com/ethereum/hive v0.0.0-20240822135954-91829ccfb2c5
Expand Down Expand Up @@ -82,10 +83,12 @@ require (
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/docker v25.0.6+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
Expand Down Expand Up @@ -113,8 +116,11 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/flatbuffers v1.12.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8 // indirect
github.com/gorilla/css v1.0.0 // indirect
Expand Down
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU=
github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down Expand Up @@ -150,7 +151,13 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs=
github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak=
github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8=
github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg=
Expand All @@ -159,6 +166,7 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
Expand Down Expand Up @@ -284,6 +292,8 @@ github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXi
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 h1:k4Tw0nt6lwro3Uin8eqoET7MDA4JnT8YgbCjc/g5E3k=
github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw=
github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -778,6 +788,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
69 changes: 20 additions & 49 deletions packages/blobstorage/pkg/http/get_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ package http
import (
"errors"
"net/http"
"strings"

"github.com/cyberhorsey/webutils"
echo "github.com/labstack/echo/v4"
"gorm.io/gorm"
)

type getBlobResponse struct {
Data []blobData `bson:"data" json:"data"`
}

type blobData struct {
BlobHash string `bson:"blob_hash" json:"blob_hash"`
KzgCommitment string `bson:"kzg_commitment" json:"kzg_commitment"`
Blob string `bson:"blob" json:"blob"`
BlobHash string `bson:"versionedHash" json:"versionedHash"`
Commitment string `bson:"commitment" json:"commitment"`
Data string `bson:"data" json:"data"`
}

// GetBlob
Expand All @@ -32,61 +30,34 @@ type blobData struct {
// @Success 200 {object} getBlobResponse
// @Router /getBlob [get]
func (srv *Server) GetBlob(c echo.Context) error {
blobHashes := c.QueryParam("blobHash")
if blobHashes == "" {
blobHash := c.Param("blobHash")
if blobHash == "" {
return webutils.LogAndRenderErrors(c, http.StatusBadRequest, errors.New("empty blobHash queryparam"))
}

data, err := srv.getBlobData(strings.Split(blobHashes, ","))
data, err := srv.getBlobData(blobHash)

if err != nil {
return webutils.LogAndRenderErrors(c, http.StatusBadRequest, err)
}

response := getBlobResponse{
Data: make([]blobData, 0),
}

// Convert data to the correct type
for _, d := range data {
response.Data = append(response.Data, blobData{
BlobHash: d.BlobHash,
KzgCommitment: d.KzgCommitment,
Blob: d.Blob,
},
)
}

return c.JSON(http.StatusOK, response)
return c.JSON(http.StatusOK, blobData{
BlobHash: data.BlobHash,
Commitment: data.Commitment,
Data: data.Data,
})
}

// getBlobData retrieves blob data from MySQL based on blobHashes.
func (srv *Server) getBlobData(blobHashes []string) ([]blobData, error) {
var results []blobData

for _, blobHash := range blobHashes {
var result blobData

bh, err := srv.blobHashRepo.FirstByBlobHash(blobHash)

if err != nil {
if err == gorm.ErrRecordNotFound {
// Handle case where blob hash is not found
result.BlobHash = "NOT_FOUND"
result.KzgCommitment = "NOT_FOUND"
result.Blob = "NOT_FOUND"
} else {
// Return error for other types of errors
return nil, err
}
} else {
result.BlobHash = bh.BlobHash
result.KzgCommitment = bh.KzgCommitment
result.Blob = bh.BlobData

results = append(results, result)
}
func (srv *Server) getBlobData(blobHash string) (*blobData, error) {
bh, err := srv.blobHashRepo.FirstByBlobHash(blobHash)
if err != nil {
return nil, err
}

return results, nil
return &blobData{
BlobHash: bh.BlobHash,
Commitment: bh.KzgCommitment,
Data: bh.BlobData,
}, nil
}
2 changes: 1 addition & 1 deletion packages/blobstorage/pkg/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ func (srv *Server) configureRoutes() {
srv.echo.GET("/healthz", srv.Health)
srv.echo.GET("/", srv.Health)

srv.echo.GET("/getBlob", srv.GetBlob)
srv.echo.GET("/blobs/:blobHash", srv.GetBlob)
}
20 changes: 9 additions & 11 deletions packages/protocol/contracts/layer1/based/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -260,27 +260,25 @@ library LibProposing {

// Update certain meta fields
if (meta_.blobUsed) {
if (!LibNetwork.isDencunSupported(block.chainid)) revert L1_BLOB_NOT_AVAILABLE();
// if (!LibNetwork.isDencunSupported(block.chainid)) revert L1_BLOB_NOT_AVAILABLE();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyberhorsey you don't mean to check in these changes, do you?

Copy link
Contributor Author

@cyberhorsey cyberhorsey Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I do, this branch isnt made to be merged yet. This change is necessary only for the current deployment, unless we also add in the L1 chain Id of Helder to the isDencunSupported code. However Helder is not going to be very long lived, so for now I just commented this out, until we migrate to Holesky or otherwise.


// Always use the first blob in this transaction. If the
// proposeBlock functions are called more than once in the same
// L1 transaction, these multiple L2 blocks will share the same
// blob.
meta_.blobHash = blobhash(local.params.blobIndex);
if (meta_.blobHash == 0) revert L1_BLOB_NOT_FOUND();
} else {
meta_.blobHash = keccak256(_txList);
emit CalldataTxList(meta_.id, _txList);
}

local.tierProvider = ITierProvider(
ITierRouter(_resolver.resolve(LibStrings.B_TIER_ROUTER, false)).getProvider(
local.b.numBlocks
)
);
// local.tierProvider = ITierProvider(
// ITierRouter(_resolver.resolve(LibStrings.B_TIER_ROUTER, false)).getProvider(
// local.b.numBlocks
// )
// );

// Use the difficulty as a random number
meta_.minTier = local.tierProvider.getMinTier(meta_.proposer, uint256(meta_.difficulty));
// meta_.minTier = local.tierProvider.getMinTier(meta_.proposer, uint256(meta_.difficulty));

meta_.minTier = 100;

if (!local.postFork) {
metaV1_ = LibData.blockMetadataV2toV1(meta_);
Expand Down
30 changes: 30 additions & 0 deletions packages/protocol/contracts/layer1/preconfs/PreconfsTaikoL1.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import "../based/TaikoL1.sol";

/// @title PreconfsTaikoL1
/// @custom:security-contact [email protected]
contract PreconfsTaikoL1 is TaikoL1 {
/// @inheritdoc ITaikoL1
function getConfig() public pure override returns (TaikoData.Config memory _config_) {
return TaikoData.Config({
chainId: 167_010,
blockMaxProposals: 324_000,
blockRingBufferSize: 360_000,
maxBlocksToVerify: 16,
blockMaxGasLimit: 240_000_000,
livenessBond: 125e18, // 125 TAIKO token
stateRootSyncInternal: 16,
maxAnchorHeightOffset: 64,
baseFeeConfig: LibSharedData.BaseFeeConfig({
adjustmentQuotient: 8,
sharingPctg: 0,
gasIssuancePerSecond: 5_000_000,
minGasExcess: 1_340_000_000,
maxGasIssuancePerBlock: 600_000_000
}),
ontakeForkHeight: 0
});
}
}
Loading
Loading