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

consensus/api/validators: Skip latest block in signed blocks info #835

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .changelog/835.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
consensus/api/validators: Skip latest block in signed blocks info

Skip the latest block since signers are only processed in the following block.
4 changes: 3 additions & 1 deletion storage/client/queries/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ const (
SELECT height, COALESCE($1 = ANY(signer_entity_ids), FALSE)
FROM chain.blocks
ORDER BY height DESC
LIMIT 100`
LIMIT 100
-- Skip the latest block since signers are only processed in the next block.
OFFSET 1`

ValidatorsData = `
WITH
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e_regression/damask/expected/validator.body
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
"node_id": "wqd9Yy3n7TWKfYRn2bI9Hd6/623CfC7NCUoRbQ5UkR8=",
"rank": 92,
"signed_blocks": [
{
"height": 8049955,
"signed": false
},
{
"height": 8049954,
"signed": true
Expand Down Expand Up @@ -430,6 +426,10 @@
{
"height": 8049856,
"signed": true
},
{
"height": 8049855,
"signed": true
}
],
"start_date": "2022-04-11T09:30:00Z",
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e_regression/eden/expected/validator.body
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
"node_id": "6wbL5/OxvFGxi55o7AxcwKmfjXbXGC1hw4lfnEZxBXA=",
"rank": 1,
"signed_blocks": [
{
"height": 16818955,
"signed": false
},
{
"height": 16818954,
"signed": true
Expand Down Expand Up @@ -430,6 +426,10 @@
{
"height": 16818856,
"signed": true
},
{
"height": 16818855,
"signed": true
}
],
"start_date": "2023-11-29T10:02:19Z",
Expand Down