Skip to content

Commit

Permalink
feat(eventindexer): fix down mig + regen bindings (#16563)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey authored Apr 2, 2024
1 parent 8836e50 commit da5a039
Show file tree
Hide file tree
Showing 18 changed files with 1,356 additions and 1,387 deletions.
238 changes: 104 additions & 134 deletions packages/blobstorage/TaikoL1.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,6 @@
"type": "uint32",
"internalType": "uint32"
},
{
"name": "blockMaxTxListBytes",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "blobExpiry",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "blobAllowedForDA",
"type": "bool",
"internalType": "bool"
},
{
"name": "blobReuseEnabled",
"type": "bool",
"internalType": "bool"
},
{
"name": "livenessBond",
"type": "uint96",
Expand Down Expand Up @@ -454,25 +434,6 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isBlobReusable",
"inputs": [
{
"name": "_blobHash",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
Expand Down Expand Up @@ -603,16 +564,6 @@
"type": "uint64",
"internalType": "uint64"
},
{
"name": "txListByteOffset",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "txListByteSize",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "minTier",
"type": "uint16",
Expand Down Expand Up @@ -924,32 +875,6 @@
],
"anonymous": false
},
{
"type": "event",
"name": "BlobCached",
"inputs": [
{
"name": "blobHash",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "BlobCached",
"inputs": [
{
"name": "blobHash",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "BlockProposed",
Expand Down Expand Up @@ -1028,16 +953,6 @@
"type": "uint64",
"internalType": "uint64"
},
{
"name": "txListByteOffset",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "txListByteSize",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "minTier",
"type": "uint16",
Expand Down Expand Up @@ -1164,16 +1079,6 @@
"type": "uint64",
"internalType": "uint64"
},
{
"name": "txListByteOffset",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "txListByteSize",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "minTier",
"type": "uint16",
Expand Down Expand Up @@ -1457,6 +1362,106 @@
],
"anonymous": false
},
{
"type": "event",
"name": "StateVariablesUpdated",
"inputs": [
{
"name": "slotB",
"type": "tuple",
"indexed": false,
"internalType": "struct TaikoData.SlotB",
"components": [
{
"name": "numBlocks",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "lastVerifiedBlockId",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "provingPaused",
"type": "bool",
"internalType": "bool"
},
{
"name": "__reserved1",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "__reserved2",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "__reserved3",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "lastUnpausedAt",
"type": "uint64",
"internalType": "uint64"
}
]
}
],
"anonymous": false
},
{
"type": "event",
"name": "StateVariablesUpdated",
"inputs": [
{
"name": "slotB",
"type": "tuple",
"indexed": false,
"internalType": "struct TaikoData.SlotB",
"components": [
{
"name": "numBlocks",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "lastVerifiedBlockId",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "provingPaused",
"type": "bool",
"internalType": "bool"
},
{
"name": "__reserved1",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "__reserved2",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "__reserved3",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "lastUnpausedAt",
"type": "uint64",
"internalType": "uint64"
}
]
}
],
"anonymous": false
},
{
"type": "event",
"name": "TransitionContested",
Expand Down Expand Up @@ -1761,12 +1766,12 @@
},
{
"type": "error",
"name": "L1_BLOB_FOR_DA_DISABLED",
"name": "L1_BLOB_NOT_AVAILABLE",
"inputs": []
},
{
"type": "error",
"name": "L1_BLOB_FOR_DA_DISABLED",
"name": "L1_BLOB_NOT_AVAILABLE",
"inputs": []
},
{
Expand All @@ -1781,22 +1786,7 @@
},
{
"type": "error",
"name": "L1_BLOB_NOT_REUSABLE",
"inputs": []
},
{
"type": "error",
"name": "L1_BLOB_NOT_REUSABLE",
"inputs": []
},
{
"type": "error",
"name": "L1_BLOB_REUSE_DISABLED",
"inputs": []
},
{
"type": "error",
"name": "L1_BLOB_REUSE_DISABLED",
"name": "L1_BLOCK_MISMATCH",
"inputs": []
},
{
Expand All @@ -1811,7 +1801,7 @@
},
{
"type": "error",
"name": "L1_BLOCK_MISMATCH",
"name": "L1_CANNOT_CONTEST",
"inputs": []
},
{
Expand Down Expand Up @@ -1854,11 +1844,6 @@
"name": "L1_INVALID_PARAM",
"inputs": []
},
{
"type": "error",
"name": "L1_INVALID_PARAM",
"inputs": []
},
{
"type": "error",
"name": "L1_INVALID_PAUSE_STATUS",
Expand Down Expand Up @@ -1974,21 +1959,6 @@
"name": "L1_TRANSITION_NOT_FOUND",
"inputs": []
},
{
"type": "error",
"name": "L1_TXLIST_OFFSET",
"inputs": []
},
{
"type": "error",
"name": "L1_TXLIST_SIZE",
"inputs": []
},
{
"type": "error",
"name": "L1_TXLIST_SIZE",
"inputs": []
},
{
"type": "error",
"name": "L1_UNAUTHORIZED",
Expand Down
639 changes: 301 additions & 338 deletions packages/blobstorage/bindings/taikol1/TaikoL1.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/blobstorage/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func InitFromConfig(ctx context.Context, i *Indexer, cfg *Config) (err error) {
}

func (i *Indexer) Start() error {
if err := i.setInitialIndexingBlock(i.ctx); err != nil {
return err
}

i.wg.Add(1)

go i.eventLoop(i.ctx, i.latestIndexedBlockNumber)
Expand Down Expand Up @@ -172,10 +176,6 @@ func (i *Indexer) withRetry(f func() error) error {
}

func (i *Indexer) filter(ctx context.Context) error {
if err := i.setInitialIndexingBlock(i.ctx); err != nil {
return err
}

// get the latest header
header, err := i.ethClient.HeaderByNumber(i.ctx, nil)
if err != nil {
Expand Down
Loading

0 comments on commit da5a039

Please sign in to comment.