Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
86ed975
create lazy aggregation adr proposal
Apr 29, 2025
ed5dce1
ammend based on feedback
Apr 30, 2025
ee3550d
Merge branch 'main' into marko/lazy-aggregation-adr
Apr 30, 2025
e7472d7
Update specs/lazy-adr/adr-021-lazy-aggregation.md
tac0turtle Apr 30, 2025
10ea3ae
Merge branch 'main' into marko/lazy-aggregation-adr
tac0turtle May 2, 2025
cb5fb90
lint fix
May 2, 2025
f68588b
Merge branch 'main' into marko/lazy-aggregation-adr
tac0turtle May 2, 2025
7fb554a
chore: empty blocks & lazy aggrgation (#2243)
tac0turtle May 2, 2025
4219dd2
remove unused
May 2, 2025
4949f09
reset block timer when no txs are present
May 2, 2025
95897a4
Simplify
Manav-Aggarwal May 2, 2025
0ea7657
Fix test
Manav-Aggarwal May 2, 2025
4d4d9d2
Add reaper logic in adr
Manav-Aggarwal May 2, 2025
b19a14e
Implement execValidate and insert back dataHash
Manav-Aggarwal May 2, 2025
d938c88
Add batchValidation in retriever
Manav-Aggarwal May 2, 2025
71dec18
modify validation logic
Manav-Aggarwal May 2, 2025
5a74dc4
Add DA Includer Loop
Manav-Aggarwal May 2, 2025
446cd75
Fix test syntax
Manav-Aggarwal May 2, 2025
eccf399
Add Validate method for signed header
Manav-Aggarwal May 2, 2025
05d2888
setDAIncluded for sequencers too
Manav-Aggarwal May 2, 2025
609d51d
Fix first retriever test
Manav-Aggarwal May 3, 2025
6cb6b1b
Refactor retriever and fix more tests
Manav-Aggarwal May 3, 2025
f616f69
fixed all retriever tests
Manav-Aggarwal May 3, 2025
6648f6c
Add more tests to retriever and handle empty blobs
Manav-Aggarwal May 3, 2025
91c30a8
make fromProto more robust
Manav-Aggarwal May 3, 2025
4dc7f9b
Add doc headers to add test methods in block package
Manav-Aggarwal May 3, 2025
1bf36e6
Make TestProcessNextDAHeader_MultipleHeadersAndBatches more robust
Manav-Aggarwal May 3, 2025
fe160ce
Fix from rebase
Manav-Aggarwal May 3, 2025
8c3006a
fix publishBlock tests
Manav-Aggarwal May 3, 2025
a16e63b
Add daIncluderTests
Manav-Aggarwal May 3, 2025
66cc82d
enable t.Parallel in all block tests
Manav-Aggarwal May 3, 2025
66a34c8
go mod tidy everywhere
Manav-Aggarwal May 3, 2025
76f652b
catch errcheck in setfinal and add test for it in daIncluder
Manav-Aggarwal May 3, 2025
3925c86
fix lint
Manav-Aggarwal May 3, 2025
b1c076e
remove gci from golintci
Manav-Aggarwal May 3, 2025
c0f82b3
Fix first test in sync_test
Manav-Aggarwal May 3, 2025
58ce301
Fix all sync tests
Manav-Aggarwal May 4, 2025
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
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
Manav-Aggarwal committed May 2, 2025
commit 0ea76571d7d7e3b83549f29acaa96fcc4cf2d6b1
3 changes: 3 additions & 0 deletions block/publish_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ func Test_publishBlock_EmptyBatch(t *testing.T) {
})
mockSeq.On("GetNextBatch", ctx, batchReqMatcher).Return(emptyBatchResponse, nil).Once()

// Mock SetMetadata for LastBatchDataKey (required for empty batch handling)
mockStore.On("SetMetadata", ctx, "l", mock.AnythingOfType("[]uint8")).Return(nil).Once()

// With our new implementation, we should expect SaveBlockData to be called for empty blocks
mockStore.On("SaveBlockData", ctx, mock.AnythingOfType("*types.SignedHeader"), mock.AnythingOfType("*types.Data"), mock.AnythingOfType("*types.Signature")).Return(nil).Once()

Comment on lines +300 to +305

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Magic string key likely a typo

SetMetadata is invoked with the literal "l":

mockStore.On("SetMetadata", ctx, "l", ... )

Everywhere else the constant LastBatchDataKey is used.
Using the wrong key means the test no longer checks the production path and may mask regressions.

-mockStore.On("SetMetadata", ctx, "l", mock.AnythingOfType("[]uint8")).Return(nil).Once()
+mockStore.On("SetMetadata", ctx, LastBatchDataKey, mock.AnythingOfType("[]uint8")).Return(nil).Once()

Expand Down