Skip to content

Commit 5680544

Browse files
author
tac0turtle
committed
still trying to fix issues unrealted to this work
1 parent a65c5aa commit 5680544

6 files changed

Lines changed: 14 additions & 12 deletions

File tree

block/da_includer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (m *Manager) DAIncluderLoop(ctx context.Context, errCh chan<- error) {
3636
}
3737
// Both header and data are DA-included, so we can advance the height
3838
if err := m.incrementDAIncludedHeight(ctx); err != nil {
39-
errCh <- fmt.Errorf("error while incrementing DA included height: %w", err)
39+
errCh <- fmt.Errorf("while incrementing DA included height: %w", err)
4040
return
4141
}
4242

block/submitter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func submitToDA[T any](
118118

119119
switch res.Code {
120120
case coreda.StatusSuccess:
121-
m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer", itemType), "gasPrice", gasPrice, "count", res.SubmittedCount)
121+
m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer,", itemType), "gasPrice ", gasPrice, "count", res.SubmittedCount)
122122
if res.SubmittedCount == uint64(remLen) {
123123
submittedAll = true
124124
}

block/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func (m *Manager) handleEmptyDataHash(ctx context.Context, header *types.Header)
173173
if headerHeight > 1 {
174174
_, lastData, err := m.store.GetBlockData(ctx, headerHeight-1)
175175
if err != nil {
176-
m.logger.Debug("previous block not applied yet", "current height", headerHeight, "previous height", headerHeight-1, "error", err)
176+
m.logger.Debug("previous block not applied yet, current height: ", headerHeight, "previous height: ", headerHeight-1, "error: ", err)
177177
}
178178
if lastData != nil {
179179
lastDataHash = lastData.Hash()

execution/evm/execution.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,11 @@ func (c *EngineClient) ExecuteTxs(ctx context.Context, txs [][]byte, blockHeight
181181
txsPayload[i] = "0x" + hex.EncodeToString(tx)
182182
}
183183

184-
prevBlockHash, _, prevGasLimit, prevTimestamp, err := c.getBlockInfo(ctx, blockHeight-1)
184+
prevBlockHash, _, prevGasLimit, _, err := c.getBlockInfo(ctx, blockHeight-1)
185185
if err != nil {
186186
return nil, 0, fmt.Errorf("failed to get block info: %w", err)
187187
}
188188

189-
ts := uint64(timestamp.Unix())
190-
if ts <= prevTimestamp {
191-
ts = prevTimestamp + 1 // Subsequent blocks must have a higher timestamp.
192-
}
193-
194189
c.mu.Lock()
195190
args := engine.ForkchoiceStateV1{
196191
HeadBlockHash: prevBlockHash,
@@ -205,7 +200,7 @@ func (c *EngineClient) ExecuteTxs(ctx context.Context, txs [][]byte, blockHeight
205200
// Create rollkit-compatible payload attributes with flattened structure
206201
rollkitPayloadAttrs := map[string]interface{}{
207202
// Standard Ethereum payload attributes (flattened) - using camelCase as expected by JSON
208-
"timestamp": ts,
203+
"timestamp": timestamp.Unix(),
209204
"prevRandao": c.derivePrevRandao(blockHeight),
210205
"suggestedFeeRecipient": c.feeRecipient,
211206
"withdrawals": []*types.Withdrawal{},
@@ -300,6 +295,13 @@ func (c *EngineClient) setFinal(ctx context.Context, blockHash common.Hash, isFi
300295

301296
// SetFinal marks the block at the given height as finalized
302297
func (c *EngineClient) SetFinal(ctx context.Context, blockHeight uint64) error {
298+
fmt.Println("Setting final block at height:", blockHeight)
299+
if blockHeight == 1 {
300+
_, _, _, _, err := c.getBlockInfo(ctx, blockHeight)
301+
if err != nil {
302+
return fmt.Errorf("failed to get block info for height 0: %w", err)
303+
}
304+
}
303305
blockHash, _, _, _, err := c.getBlockInfo(ctx, blockHeight)
304306
if err != nil {
305307
return fmt.Errorf("failed to get block info: %w", err)

scripts/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func main() {
255255
time.Sleep(3 * time.Second)
256256

257257
// Get node ID of the first node to use for peer connections
258-
nodeIdCmd := exec.Command(appPath, "node-info", fmt.Sprintf("--home=%s", nodeHome))
258+
nodeIdCmd := exec.Command(appPath, "net-info", fmt.Sprintf("--home=%s", nodeHome))
259259
nodeInfoOutput, err := nodeIdCmd.CombinedOutput()
260260
if err != nil {
261261
log.Printf("Error getting node info for node %d: %v, output: %s", i, err, string(nodeInfoOutput))

scripts/test.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test-integration:
2424
## test-e2e: Running e2e tests
2525
test-e2e: build build-da build-evm-single
2626
@echo "--> Running e2e tests"
27-
@cd test/e2e && go test -mod=readonly -failfast -timeout=15m -tags='e2e evm' ./... --binary=$(CURDIR)/build/testapp --evm-binary=$(CURDIR)/build/evm-single
27+
@cd test/e2e && go test -mod=readonly -failfast -timeout=15m -tags='e2e evm' -v ./... --binary=$(CURDIR)/build/testapp --evm-binary=$(CURDIR)/build/evm-single
2828
.PHONY: test-e2e
2929

3030
## test-integration-cover: generate code coverage report for integration tests.

0 commit comments

Comments
 (0)