-
Notifications
You must be signed in to change notification settings - Fork 166
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
[Verification] rolls-in persistent architecture #728
Merged
Merged
Changes from 250 commits
Commits
Show all changes
591 commits
Select commit
Hold shift + click to select a range
0b8af37
adds more godocs
yhassanzadeh13 2dec4c8
Merge branch 'master' into yahya/5208-fetcher-engine
yhassanzadeh13 6670f03
adds qualifier
yhassanzadeh13 a0f6777
adds concurrency support for testing update on chunk data requests
yhassanzadeh13 c004066
Merge remote-tracking branch 'origin/yahya/5208-fetcher-engine' into …
yhassanzadeh13 eafc48b
adds godoc for qualifier
yhassanzadeh13 b273ebe
adds incremental qualifier and wires it to the code
yhassanzadeh13 784ff13
adds more godoc for incremental qualifier
yhassanzadeh13 9346de2
changes requesting logic
yhassanzadeh13 3192aac
refactors interface of request qualifier
yhassanzadeh13 9a8503b
adds qualifying requests logic to requester
yhassanzadeh13 e42ca99
adds retry after field to chunk requests
yhassanzadeh13 6e9e905
adds increment attempt and retry after
yhassanzadeh13 ad321fe
adds targets to chunk request status
yhassanzadeh13 b6d2b00
resolves fixtures and tests after refactoring chunk data request
yhassanzadeh13 ee8020e
refactors interface of chunk data pack requester
yhassanzadeh13 101c5e3
Merge remote-tracking branch 'origin/master' into yahya/5208-fetcher-…
yhassanzadeh13 dfd5573
removes commented parts
yhassanzadeh13 7df540c
refactors chunk requests interface to only deal with chunk data requests
yhassanzadeh13 20c798c
adds id for chunk data request
yhassanzadeh13 615c775
fixes lint issues
yhassanzadeh13 6a4d360
adds attempt as return value of by ID
yhassanzadeh13 c602a62
refactors broken tests
yhassanzadeh13 40e19de
re-generate mocks
yhassanzadeh13 7b74f79
adds chunk data request list fixture
yhassanzadeh13 c204f70
fixes test for pending chunk with sealed block
yhassanzadeh13 51ecdbf
fixes chunk data pack request fixtures target ID
yhassanzadeh13 a2146bf
adds chunk data pack request list
yhassanzadeh13 0d4e126
fixes requesting chunk data pack
yhassanzadeh13 dfbd285
fixes test request pending chunk data pack
yhassanzadeh13 248cb5c
fuxes test request pending chunk sealed block hybrid
yhassanzadeh13 e6a68eb
Merge remote-tracking branch 'origin/master' into yahya/5208-fetcher-…
yhassanzadeh13 f6ec6c4
cleans up fixtures for chunk request status
yhassanzadeh13 f611b55
makes chunk request status private
yhassanzadeh13 713f586
refactors behavior on duplicate locators
yhassanzadeh13 1f35643
Update engine/verification/fetcher/engine.go
yhassanzadeh13 52da338
Update engine/verification/fetcher/engine.go
yhassanzadeh13 f13c674
Update engine/verification/fetcher/engine.go
yhassanzadeh13 e45c98c
refactors checking node status at block ID
yhassanzadeh13 b4a3f3b
Merge remote-tracking branch 'origin/yahya/5208-fetcher-engine' into …
yhassanzadeh13 dc4a867
fixes shallow copy
yhassanzadeh13 332a1bd
makes an error nested
yhassanzadeh13 15a81d2
Merge remote-tracking branch 'origin/master' into yahya/5208-fetcher-…
yhassanzadeh13 7c84b56
Update utils/unittest/fixtures.go
yhassanzadeh13 22e69e7
Merge remote-tracking branch 'origin/master' into yahya/5208-fetcher-…
yhassanzadeh13 d0af0d8
caches last sealed on local variable extrinsic to loop
yhassanzadeh13 e93359e
fixes lint issue
yhassanzadeh13 34d57ec
Update engine/verification/requester/requester_test.go
yhassanzadeh13 4bbc200
Update utils/unittest/fixtures.go
yhassanzadeh13 19c0bfb
Update engine/verification/fetcher/engine_test.go
yhassanzadeh13 f1a33f8
Update engine/verification/fetcher/engine_test.go
yhassanzadeh13 1788db5
fixes lints and typos on requester tests
yhassanzadeh13 e65bc69
adds comment for testcase
yhassanzadeh13 dbba9bc
adds timeout for ready and done methods of engine in tests
yhassanzadeh13 924f468
Update engine/verification/fetcher/engine_test.go
yhassanzadeh13 852831f
Update engine/verification/fetcher/engine_test.go
yhassanzadeh13 4befbd5
Update engine/verification/fetcher/engine_test.go
yhassanzadeh13 272a5d1
fixes lint
yhassanzadeh13 930e4bf
removing unnecessary log
yhassanzadeh13 e8c43ce
adds comment for a fatal level log
yhassanzadeh13 4a1296d
consolidates a log at requester engine
yhassanzadeh13 8d39d0e
Merge branch 'master' into yahya/5208-fetcher-engine
yhassanzadeh13 db0a672
adds capacity to chunklist of chunk status
yhassanzadeh13 a3b0acf
Merge remote-tracking branch 'origin/yahya/5208-fetcher-engine' into …
yhassanzadeh13 885aa52
runs consumer check asynchronously
yhassanzadeh13 2dcbcbf
refactors loop variable
yhassanzadeh13 3766f89
Merge remote-tracking branch 'origin/master' into yahya/5208-fetcher-…
yhassanzadeh13 168d092
fixes lint
yhassanzadeh13 fb2fe84
Merge branch 'master' into yahya/5208-fetcher-engine
yhassanzadeh13 b2f97bb
Merge remote-tracking branch 'origin/yahya/5208-fetcher-engine' into …
yhassanzadeh13 a6e8575
fixes lint
yhassanzadeh13 9719e56
fixes lint issues and interface
yhassanzadeh13 6ffaf95
refactors chunk request and moves request info to request status
yhassanzadeh13 1ada8d5
refactors update retry after
yhassanzadeh13 bbb35e1
adds request info
yhassanzadeh13 3769d24
refactors attempt type
yhassanzadeh13 a6fcfe9
updates mock
yhassanzadeh13 c5367c9
adds qualifier functions
yhassanzadeh13 e6dfb0d
fixes mocking issue
yhassanzadeh13 6e3ec57
adds mock for qualifier
yhassanzadeh13 1765030
fixes tests with qualifier
yhassanzadeh13 8b3f384
moves qualifier functions to utils and generates exponential backoff
yhassanzadeh13 b50a63e
merges master into branch
yhassanzadeh13 998fd0c
fixes lint issues.
yhassanzadeh13 7c5876e
removes request qualifier
yhassanzadeh13 4a68fdc
migrates qualifier logic to requester engine
yhassanzadeh13 21ca38d
Merge remote-tracking branch 'origin/master' into yahya/5428-exponent…
yhassanzadeh13 86d0f63
moves exponential backoff to chunk requests
yhassanzadeh13 1b750e7
adds history update functions
yhassanzadeh13 45f47f6
adds godoc
yhassanzadeh13 5b4a01f
refactors tests with updater
yhassanzadeh13 a43a1a4
adds with updater scenario
yhassanzadeh13 aadb873
adds draft for retry after test in exponential mode
yhassanzadeh13 d7ef0be
updates exponential backup behavior
yhassanzadeh13 a711ee4
adds tests for chunk request updater
yhassanzadeh13 5481ad3
adds comment for with updater scenario
yhassanzadeh13 d6517d1
adds godoc for exponential updater
yhassanzadeh13 73ff6e9
Merge remote-tracking branch 'origin/master' into yahya/5428-exponent…
yhassanzadeh13 2188920
fixes mock for pending chunks
yhassanzadeh13 c98c7d7
fixes requester tests
yhassanzadeh13 3028aa1
logs updating dispatched requests
yhassanzadeh13 6e437c8
updates chunk requests interface
yhassanzadeh13 5e6d947
adds contains for identifier list
yhassanzadeh13 aaed073
refactors test with new qualifier
yhassanzadeh13 0401838
fixes tests with request info and update mocking
yhassanzadeh13 222f33d
fixes a bug on requester side
yhassanzadeh13 8eb1bf3
adds test dispatching requests on hybrid case
yhassanzadeh13 f9db537
removes unlimited qualifier
yhassanzadeh13 d436788
Merge remote-tracking branch 'origin/master' into yahya/5428-exponent…
yhassanzadeh13 cbd62f3
adds godoc to requester
yhassanzadeh13 d93bd53
fixes log
yhassanzadeh13 b2eaca9
fixes tests
yhassanzadeh13 03cab00
refactors test organization
yhassanzadeh13 bc9c663
adds more godoc to the tests
yhassanzadeh13 50de26d
Merge remote-tracking branch 'origin/master' into yahya/5428-exponent…
yhassanzadeh13 3b0cad9
adds more comment to tests
yhassanzadeh13 445819a
adds godoc for request qualifier methods
yhassanzadeh13 4ff097f
Merge remote-tracking branch 'origin/master' into yahya/5428-exponent…
yhassanzadeh13 b0587eb
minor refactors on chunk requests
yhassanzadeh13 840515e
fixes lint issues with tests
yhassanzadeh13 8e1f591
adds more test to chunk requests
yhassanzadeh13 421e324
fixes lint issues
yhassanzadeh13 d874af4
moves test setup to mock package and refactors tests
yhassanzadeh13 10f51f0
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 3b11268
refactors test helpers
yhassanzadeh13 503e612
refactors tracers and loggers on tests
yhassanzadeh13 090978b
adds todos
yhassanzadeh13 aa0dc3d
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 9b49725
fixes lint issue after merge
yhassanzadeh13 62064b9
refactors mock execution node in verification tests
yhassanzadeh13 ecaeba4
adds chunk data pack of helper
yhassanzadeh13 c6b6e93
moves fixture to the new package and refactors setup mock chunk provider
yhassanzadeh13 f231720
Merge remote-tracking branch 'origin/yahya/5292-assigner-fetcher-inte…
yhassanzadeh13 a24363c
refactors tests with complete execution receipt list methods
yhassanzadeh13 040cd76
adds godocs for test helpers
yhassanzadeh13 15d46d5
adds chunk of test helper
yhassanzadeh13 7e9eb82
enables mock consensus node for multiple results and refactors tests
yhassanzadeh13 dee75e0
adds batch ready and done helpers to unittest
yhassanzadeh13 0225989
adds done helper for generic node
yhassanzadeh13 010c4d8
reorganizes new verification node constructor
yhassanzadeh13 160f713
adds handler engine registration method and its implementation
yhassanzadeh13 df82596
fixes lint issues in verification tests
yhassanzadeh13 0f02d25
wires up the assigner and fetcher tests
yhassanzadeh13 91473e0
addresses system chunk collection verification
yhassanzadeh13 e001510
avoids stopping verification node on tests
yhassanzadeh13 0435b56
fixes collection ID of system chunk on fixtures
yhassanzadeh13 de7bf48
adds logger to consumer module
yhassanzadeh13 0f5044c
fixes lint issues
yhassanzadeh13 052b570
fixes a bug with chunk consumer notifier
yhassanzadeh13 ae99dab
wip with assigner and fetcher tests
yhassanzadeh13 1e84484
refactors imports
yhassanzadeh13 657e59e
fixes import cycle and mocking issues
yhassanzadeh13 6a6f6ef
work in progress with system chunk
yhassanzadeh13 fda7186
encapsulates validating chunks and fixes notifying sealed blocks
yhassanzadeh13 fb25bc7
fixes tests on fetcher engine
yhassanzadeh13 2ba31c9
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 9d71f42
fixes executor id for execution results fixture
yhassanzadeh13 dce7527
fixes integration test
yhassanzadeh13 0ea5908
cleans up tests
yhassanzadeh13 6febb12
adds documentation
yhassanzadeh13 dcd6baa
refactors tests
yhassanzadeh13 badd654
decouples validating collections
yhassanzadeh13 11bc124
cleans up tests
yhassanzadeh13 dd24309
refactors a godoc
yhassanzadeh13 f27bf86
adds godoc to the test.
yhassanzadeh13 f3b9fd6
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 b8c1958
adds mock assertions
yhassanzadeh13 e385e1e
fixes documentations
yhassanzadeh13 ebaa474
fixes log messages
yhassanzadeh13 0f93263
fixes logs
yhassanzadeh13 5d6f009
fixes tests
yhassanzadeh13 6f31298
adds metric collector interface
yhassanzadeh13 84e475d
refactors metrics name
yhassanzadeh13 9e170cb
adds metrics variables
yhassanzadeh13 2e02819
adds verification name spaces
yhassanzadeh13 8705a92
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 3f8ebe5
adds chunk locator ID method to chunk status
yhassanzadeh13 766b28b
extends error messages with identifiers
yhassanzadeh13 b34e6d4
refactors order of calling consumer on sealed block
yhassanzadeh13 1c7bedd
Update engine/verification/test/assignerfetcher_test.go
yhassanzadeh13 760e723
Update engine/verification/test/assignerfetcher_test.go
yhassanzadeh13 fe03f96
fixes lints
yhassanzadeh13 61ff720
refactors ready-done-aware test helpers
yhassanzadeh13 64c8a27
Merge remote-tracking branch 'origin/master' into yahya/5292-assigner…
yhassanzadeh13 8e53920
refactors tests with require component ready and done
yhassanzadeh13 ac1bdb5
Merge branch 'yahya/5292-assigner-fetcher-integration-test' into yahy…
yhassanzadeh13 a05c476
fixes godocs
yhassanzadeh13 d119554
fixes namespace
yhassanzadeh13 5abc63c
adds metrics and registrations
yhassanzadeh13 a4d3895
implements metrics methods
yhassanzadeh13 ab17d2d
wires in metrics to fetcher and requester
yhassanzadeh13 aafe23c
fixes TestProcessAssignedChunkHappyPath
yhassanzadeh13 ca37128
fixes TestChunkResponse_RemovingStatusFails
yhassanzadeh13 1d4ca6a
fixes TestProcessAssignChunkSealedAfterRequest
yhassanzadeh13 1441b6b
fixes TestChunkResponse_InvalidChunkDataPack TestChunkResponse_Missin…
yhassanzadeh13 596ba5d
fixes TestSkipChunkOfSealedBlock
yhassanzadeh13 51cf47b
Merge remote-tracking branch 'origin/master' into yahya/5427-fetcher-…
yhassanzadeh13 fcc94af
refactors metrics to mock in requester tests
yhassanzadeh13 3f8969a
fixes TestHandleChunkDataPack_HappyPath
yhassanzadeh13 bbf0279
fixes TestCompleteRequestingUnsealedChunkLifeCycle
yhassanzadeh13 80b95e0
fixes TestRequestPendingChunkSealedBlock_Hybrid
yhassanzadeh13 d64699a
Merge remote-tracking branch 'origin/master' into yahya/5427-fetcher-…
yhassanzadeh13 45252a8
fixes TestDispatchingRequests_Hybrid
yhassanzadeh13 b788a3f
reorganizes the code
yhassanzadeh13 a1f398b
adds metrics support for chunk status
yhassanzadeh13 254e421
adds metrics for chunk requests mempool size
yhassanzadeh13 8c442b2
generates mocks for mempools
yhassanzadeh13 7e7fad4
adds tracer labels
yhassanzadeh13 2027c5c
adds context to chunk status
yhassanzadeh13 94587a6
adds tracer to fetcher engine
yhassanzadeh13 75d6ffe
adds tracer for pushing chunk to verifier and validating it
yhassanzadeh13 f0e2084
Merge remote-tracking branch 'origin/master' into yahya/5427-fetcher-…
yhassanzadeh13 a5573ef
adds tracer labels for requester engine
yhassanzadeh13 75d168c
adds tracer to requester engine
yhassanzadeh13 00a0d2d
removes is system chunk from match engine
yhassanzadeh13 116f66f
moves happy path verification test to utils
yhassanzadeh13 1a67629
refactors demo with happy path
yhassanzadeh13 830de73
Merge remote-tracking branch 'origin/master' into yahya/5427-fetcher-…
yhassanzadeh13 0030198
fixes lint issues
yhassanzadeh13 08c34cc
adds random calls for our new metrics
yhassanzadeh13 7c378df
refactors tracing on fetcher engine
yhassanzadeh13 6b964f0
fixes godocs
yhassanzadeh13 826907b
refactors metrics
yhassanzadeh13 2f1a912
Merge branch 'master' into yahya/5427-fetcher-and-requester-metrics
yhassanzadeh13 cfde9c1
Merge branch 'master' into yahya/5427-fetcher-and-requester-metrics
yhassanzadeh13 4fa9144
WIP
yhassanzadeh13 6d4645c
adds chunk request mempool
yhassanzadeh13 f47487e
wires in new engines
yhassanzadeh13 7d8c563
fixes dependency issue in cmd
yhassanzadeh13 91e99c4
swaps component orders
yhassanzadeh13 eb863c4
removes handler checking from requester
yhassanzadeh13 9448f7c
reorganizes component initializations
yhassanzadeh13 9b4a28b
reports error on block consumer initialization
yhassanzadeh13 19e1ac5
separates chunk consumer and block consumer as separate modules
yhassanzadeh13 fb641e9
removes checking handler fatal logs
yhassanzadeh13 4f4855e
adds comments for verification parameters
yhassanzadeh13 48f1c3f
Merge remote-tracking branch 'origin/master' into yahya/5521-roll-in-…
yhassanzadeh13 b2fafd9
fixes lint
yhassanzadeh13 d715159
updates mock network
yhassanzadeh13 91697b1
migrates constants and refactors data types
yhassanzadeh13 06fb98d
fixes a comment
yhassanzadeh13 00dad92
Merge branch 'master' into yahya/5521-roll-in-new-verificaiton
yhassanzadeh13 9559281
refactors bootstrapping fetcher and requester as modules
yhassanzadeh13 892598a
groups requester and fetcher in the same component
yhassanzadeh13 1cd712e
wires in done dependency
yhassanzadeh13 e6f318e
Merge remote-tracking branch 'origin/master' into yahya/5521-roll-in-…
yhassanzadeh13 a00c2b3
fixes lint issues
yhassanzadeh13 a5ecf42
Merge remote-tracking branch 'origin/master' into yahya/5521-roll-in-…
yhassanzadeh13 1481140
sets chunk and block workers
yhassanzadeh13 9cd3053
Merge remote-tracking branch 'origin/master' into yahya/5521-roll-in-…
yhassanzadeh13 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this change is to resolve a cyclic dependency that causes node crash on startup:
cmd/verification/main
, the fetcher engine is both created and started prior to thechunkConsumer
(which has thechunkConsumerNotifier
).chunkConsumer
is created, it sets thechunkConsumerNotifier
of thefetcher
engine.fetcher
engine beforechunkConsumer
initialization crashes the node with afatal
error.Hence, we discard this checking and rely on the fact that similar to any other component of a node, missing a
chunkConsumerNotifier
literally leads the node to crash with panic upon processing the first chunk. This is the same strategy we take about other components, e.g., network, which missing assignment of that on a node panics the first time node tries sending a message.The other solution would be to decouple the component initialization and startup on the scaffold, but not sure of its side effects on other nodes (considerable on a separate PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it will introduce a race condition at startup where sometimes the node will crash. I don't think the network component has the same behaviour (it may error before the mesh network is set up but it won't crash the node). It would be better to avoid this if we can.
What we do for some other engines with a similar dependency structure (eg.
epochmgr
,compliance
) is embed the dependency within the engine and have the engine manage the lifecycle of the dependency. Then both the dependency and the engine can be instantiated in oneComponent
block in the scaffold.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 9559281 and 892598a