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

fix: (alan) don't return on unhandled message types in exporter #1476

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

y0sher
Copy link
Contributor

@y0sher y0sher commented Jul 16, 2024

Description

A bug that managed to get through the CR process, was stopping handling messages in exporter if it received a message that wasn't consensus or partial sig. (could be EventMsg like Timeout or ExecuteDuty).

Fix

continue instead of return

@y0sher y0sher requested a review from guym-blox July 16, 2024 17:55
@y0sher y0sher merged commit e854033 into alan/no-fork Jul 16, 2024
0 of 5 checks passed
MatusKysel added a commit that referenced this pull request Jul 22, 2024
* message validation: use maxPartialSignatureMsgsSize from block with all constants (#1458)

* feat: implement genesis validator

* fixed shares

* fixed queues

* adjust exporter to committee consensus (#1409)

* Draft of partial signatures as decided

* Deploy to stage exporter

* Increase buffer size

* Add debug log

* Fix build and lint issues

* Add debug log for any message

* More logs

* Add message type log

* Fix message type

* Fix panic

* Delete redundant logs

* Storage logs

* Delete redundant logs

* More storage logs

* Fix log

* Sort signers

* Fix some issues

* Cleanup

* Restore old decided logic for compatibility with explorer

* Restore old decided logic for compatibility with explorer [2]

* Revert "Restore old decided logic for compatibility with explorer [2]"

This reverts commit 80a2e37.

* Revert "Restore old decided logic for compatibility with explorer"

This reverts commit b61a1b9.

* Adjust new API to the old one

* Remove redundant cases of using NewDecidedHandler

* Identifier as base64 in API

* Remove participants DB logs

* Remove dummy data

* Set commit msg type in deprecated API

* Godoc

* Don't send data in new format to stream

* Rename Operators to Signers

* Add FullData to response

* Add dummy round

* Configurable usage of new API

* Rename Operators to Signers in API response

* Godoc

* Cleanup

* Cleanup [2]

* Fix TestHandleDecidedQuery

* Disable deployment

* Fix TestHandleNonCommitteeMessages

* Fix option name

* Revert "Disable deployment"

This reverts commit 369c26b.

* Disable deployment

* deploy to stage

* deploy to stage

* remove deployment change

* deploy to stage

* revert deployment

* change deployment

* change deployment

* change deployment

* change deployment

* Gm/ssv 137 add pre and post consensus logs (#1387)

* add more logs to ProcessPreConsensus

* add logs to ProcessConsensus and ProcessPostConsensus to give more sense about time consuming by diff components

* change gitlab ci to test on stage

* add logs [attester] to ProcessConsensus and ProcessPostConsensus to give more sense about time consuming by diff components

* change github ci in order to test on stage

* add symbols to validator registration logs

* fix typo mistake

* fix text to align spec

* align all runners logs

* add got decided to attester runner

* add logs to attester runner

* add logs to sync_committee runner

* pushing to nodes 61-64

* refactors (still WIP)

* fixes

* rename

* log

* fix

* refactor

* refactors

* add slots to logs

* bugfix

* deploy stage + logs PR to 1-60

* approve spec diffs

* revert gitlab

* deploy stage + logs PR to nodes 1-60

* revert gitlab

* review

* fixed log

* improve aggregators logs

* deploy to 13-60

* fixed agg consensus time

* approve spec diffs

* fix logs

* log block hash in submission errors

* fix block hash log

* approve spec diff

* revert gitlab

---------

Co-authored-by: guy muroch <[email protected]>
Co-authored-by: moshe-blox <[email protected]>

* test deployment

* test deployment

* fix query_handlers.go merge

* fix deployment file

* fix deployment file

* add logs

* add logs

* add logs

* add logs

* add logs

* add logs

* add logs

* add logs

* add logs

* pull from alan/no-fork

* align e2e types

* add attester runner to exporter roles

* created new storage for old role types

* remove extra qbft store

* add logs

* adding logs

* change relevant places spectypes.Role to exporter Role in order to support Attester

* fixing typo

* adjust participantsRange to work with old spec roles

* add validation for validatorByIndex

* add validation for validatorByIndex

* change Role type to attester instead of committee

* change Role type to attester instead of committee

* change DomainType back to spectypes

* remove space

* deploy to stage

* push to stage

* add logic to save participants with right role (sync_committee, attester)

* add syncCommittee role to exporter roles

* add sync committee role to roles in exporter

* add sync committee role to roles in exporter

* add sync committee role to roles in exporter

* remove all deprecations from query handlers using decided, only participants work now

* add sync_committee store

* add sync_committee store

* add sync_committee store

* fix string

* fix broadcast decided message string

* add log after save participatns

* add log for debug

* fix saved participants log

* loop over post consensus partial sig messages to build decided

* change nonCommittee stracture to support many validators

* change parsing non committee messages to work with committeeObserver and not per validator

* remove support for query multi public keys

* clean code and add logs

* fix exporter spec tests

* fix tests for exporter + extend TestHandleDecidedQuery to all roles

* fix spec test reletead to exporter + remove redundant init qbft stores for operator controller

* adding qbft store to operator controller

* remove space

* remove redundant code

* fix issues after code review

* fix issues after code review

* fix issues after code review

* fix issues after code review

* finalize PR review

* renamed function, added err handling for nvc message processing.

* align to alan/no-fork (Domain type) and fix package (convert) reference rename

---------

Co-authored-by: Nikita Kryuchkov <[email protected]>
Co-authored-by: guy muroch <[email protected]>
Co-authored-by: moshe-blox <[email protected]>
Co-authored-by: y0sher <[email protected]>

* message validation: replace treemap with an array (#1457)

Change treemap to array

* genesis message validation: remove unused qbft config (#1463)

* message validation: optimize constructing validator indices (#1462)

message validation: optimize constructing validator indices

* Fix commented-out code in network/p2p/test_utils.go (#1456)

* Remove remaining GetDefaultDomain/SetDefaultDomain (#1455)

Remove remaining GetDefaultDomain/SetDefaultDomain

* fix panic and networking

* fix rest of the metrics

* rename metrics to genesis

* fix genesis runners

* fix: pass only relevant duty validator shares into the slot committee runner (#1460)

* pass only relevant duty validator shares into the slot committee runner

* fix: Remove beacon duties without shares in StartDuty function

The StartDuty function in the Committee struct now removes beacon duties that do not have a corresponding share. This ensures that only relevant duty validator shares are passed into the slot committee runner.

* Stop committee duty if no beacon duties exist.

* fix bug in controller

* go.mod: remove gods dependency (#1474)

* message validation: check voluntary exit existence (#1468)

message validation: check voluntary exit existence

* refetch duties after metadata update (#1470)

* Adjust P2P Scoring for Committee Consensus (#1418)

* Message rate calculation

* Refactor message rate computation to make formulas more readable

* Add validation nil check. Return rate in seconds

* Add operators and validators map input. Use the correct message rate calculation

* Pass operators and validators maps to NewSubnetTopicOpts and define new GetCommitteeMapsForTopic for PubSubConfig

* Add GetCommitteeMapsForTopic method to Config and to the Controller interface

* Add GetCommitteeMapsForTopic method to Controller mock

* Change log to add committees and validators in topic

* Re-deploy

* Check if validator is participating before including it

* Use list of storage.Committee instead of two maps

* Deprecate created GetCommitteeMapsForTopic function. Use list of storage.Committee

* Align tests to use committee list

* Add debugging logs

* Logs for debugging

* Re-deploy

* Debugging logs

* Use topic full name for filtering comparison

* Remove debugging logs

* Remove unused errors

* Remove unnecessary error from returned values.

* Remove mistaken newline

---------

Co-authored-by: MatheusFranco99 <[email protected]>

* Refresh P2P scoring parameters (#1469)

* Message rate calculation

* Refactor message rate computation to make formulas more readable

* Add validation nil check. Return rate in seconds

* Add operators and validators map input. Use the correct message rate calculation

* Pass operators and validators maps to NewSubnetTopicOpts and define new GetCommitteeMapsForTopic for PubSubConfig

* Add GetCommitteeMapsForTopic method to Config and to the Controller interface

* Add GetCommitteeMapsForTopic method to Controller mock

* Change log to add committees and validators in topic

* Re-deploy

* Check if validator is participating before including it

* Use list of storage.Committee instead of two maps

* Deprecate created GetCommitteeMapsForTopic function. Use list of storage.Committee

* Align tests to use committee list

* Add debugging logs

* Logs for debugging

* Re-deploy

* Debugging logs

* Use topic full name for filtering comparison

* Remove debugging logs

* Remove unused errors

* Remove unnecessary error from returned values.

* Remove mistaken newline

* Add function in topics controller to update the topic params

* Trigger UpdateScoreParams in p2pNetwork.UpdateSubnets function

* Stop using p2pNetwork.UpdateSubnets and use a new function solely for updating the score params

* Remove error.Join due to compilation error

* Apply suggestion to use a CommitteeProvider interface

---------

Co-authored-by: Nikita Kryuchkov <[email protected]>

* empty commit

* Update holesky-stage.go

* continue to read messages instead of returning on exporter (#1476)

* align committee runner consensus logs (#1475)

* align committee runner consensus logs

* change convert.Role to spectype.RunnerRole in runners

* added back logs for debug

* change got partial signatures log to contain more details

---------

Co-authored-by: guy muroch <[email protected]>

* switch to old msg validations

* add comment to be more clear

* remove old share storage

* fix: (alan) bring back slashing check from spec (#1479)

* bring back valcheck from spec

* chore: Pass attestingValidators to CommitteeRunnerFunc in SetupCommitteeRunners for value checking.

* refactor: attestingValidators -> slashableValidators

* Alan/switch domain at runtime (#1454)

* add DomainType() calculating fork

* update network consumers to use DomainType()

* add ENR update function at fork

* add fork listener to scheduler

* add fork handler test

* some refactors and fixes

* TODO

* use dynamic domain type in runners

* add next domain type support in discovery

* fix merge leftovers

* (handshakes) update self NodeInfo domain type before handing over to peers

* change Alan domain type for holesky-stage

---------

Co-authored-by: moshe-blox <[email protected]>
Co-authored-by: y0sher <[email protected]>

* empty commit

* add subscriber

* empty commit

* tests: fix store tests

* fix domain test

* pass domain type provider to handshake config (#1484)

* fix controller tests

* (Alan/no-fork) Make spec tests work again (#1480)

* fixed compilation errors and runtime panics

* removed incorrect filtering

* removed panic

* added helpers to correclty get signers

* removed convert usage outside of db work

* fixed qbft

* added missing domain provider in fixRunner

* added TODO for filtering

* returned slashable validators. fixed ibft store tests

* fixed comments

* fix subscriber

* fix bug in network wrapper

* enable logs

* align attester to support prefork

* add genesis duty executor

* add more logs

* add more logs

* even more logs

* genesis msg handling

* fix fork resolving

* add logs

---------

Co-authored-by: Nikita Kryuchkov <[email protected]>
Co-authored-by: guym-blox <[email protected]>
Co-authored-by: guy muroch <[email protected]>
Co-authored-by: moshe-blox <[email protected]>
Co-authored-by: y0sher <[email protected]>
Co-authored-by: MatheusFranco99 <[email protected]>
Co-authored-by: Lior Rutenberg <[email protected]>
Co-authored-by: Pavel Krolevets <[email protected]>
Co-authored-by: Anton Korpusenko <[email protected]>
@liorrutenberg liorrutenberg deleted the alan/fix-exporter-return branch July 23, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant