You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add more test cases for submitBlocksToDA in manager_test.go #1530
This needs an update to testing.
Test cases I can think of that we should understand how they execute.
Assuming starting with Blocks a b c
1. happy case, all are submitted on first round
2. a and b are submitted first because including c triggers size limit. C is then submitted on second round.
3. C is too big on it's own, never submitted but a and b are
4. C has a marshal issue. A and b should still be submitted ( I think this case currently isn't possible with the code based on `SubmitBlocks`)
5. A is too big on its own
6. A has a marshal issue
for cases 5 and 6, what should be the desired outcome? Do we never submit any blocks if the current next block is bad? Based on `SubmitBlocks` that appears to be the case.
_Originally posted by @MSevey in https://github.com/rollkit/rollkit/pull/1471#pullrequestreview-1832928038_
Note that test cases 1, 2, 3 here are added and test cases 4, 5, 6 need to be added.
changed the title [-]Add more test cases for submitBlocksToDA in manager_test[/-][+]Add more test cases for submitBlocksToDA in manager_test.go[/+]on Feb 8, 2024
Can we catch serialisation errors much earlier at like the addPendingBlock stage. In the current implementation, this would come at the cost of serialising the same block an extra time but, we could avoid that by caching the result from the early serialisation step. This change could potentially help keep the pending block struct smaller.
I'll proceed with writing the tests for cases 4, 5 and 6 for now.
Another option would be to separate the aggregation of blocks from the submission to DA and have the method which does the aggregation (applying size limits and serialization) in the block manager. Eviction on error could happen at this stage easily. (Probably log and evict for now?)
Activity
[-]Add more test cases for submitBlocksToDA[/-][+]Add more test cases for submitBlocksToDA in manager_test[/+][-]Add more test cases for submitBlocksToDA in manager_test[/-][+]Add more test cases for submitBlocksToDA in manager_test.go[/+]arhamj commentedon Feb 14, 2024
Can we catch serialisation errors much earlier at like the
addPendingBlockstage. In the current implementation, this would come at the cost of serialising the same block an extra time but, we could avoid that by caching the result from theearly serialisationstep. This change could potentially help keep the pending block struct smaller.I'll proceed with writing the tests for cases 4, 5 and 6 for now.
arhamj commentedon Feb 14, 2024
Another option would be to separate the aggregation of blocks from the submission to DA and have the method which does the aggregation (applying size limits and serialization) in the block manager. Eviction
on errorcould happen at this stage easily. (Probably log and evict for now?)test(ut): added tests to check the existing behaviour for block/manag…