Commit Graph

66 Commits

Author SHA1 Message Date
Nico Flaig
9335cc552b chore: disable rate limiting on local testnet node (#5728) 2023-07-04 09:52:47 -04:00
Nico Flaig
a4c93c1325 chore: fix local testnet dev scripts (#5719) 2023-06-29 10:20:26 -04:00
Lion - dapplion
46ebb53e55 ci: assert yarn prints no warnings (#5565)
* Assert in CI yarn prints no warnings

* Add exit 1
2023-06-27 18:45:59 +02:00
Lion - dapplion
9e57b7d320 ci: check docs spelling (#5527)
* Check docs spelling

* Add config

* Fix docs spelling

* Lint docs format

* docs(flamegraph): remove note about script that was removed

* sort wordlist

* Set sort algo

* Fix CI pipeline

* hope to fix CI ordering

* Disable wordlist sort check

* docs(CONTRIBUTING): remove merge conflict marker and add codeblock types

* refactor: change to pyspelling.yml for local runs

* docs: make spell-checking wordlist case insensitive

* fix: sort .wordlist.txt

* refactor: alphabetize script order

* fix: add docs/reference to gitignore

* docs: add codeblocks to pyspelling ignore and clear all errors

* docs: ignore possessive endings in spellcheck

* docs: clear spelling errors in package readmes

* docs: pyspelling fix generated cli.md

* feat(workflows): lint generated docs

* feat(workflows): add word sort to docs-check

* test: unsort wordlist

* fix: sort wordlist

* refactor(workflow): remove unused comments

---------

Co-authored-by: matthewkeil <me@matthewkeil.com>
Co-authored-by: Cayman <caymannava@gmail.com>
2023-06-21 18:24:27 +00:00
Nico Flaig
4bbe595f5d chore: fix lint-grafana-dashboard.mjs id assertion (#5673) 2023-06-20 08:49:19 -04:00
Nico Flaig
d1ba8c1473 chore: add job names to __inputs if used by dashboard (#5672)
* Add job names to __inputs if used by dashboard

* Reorder properties in prometheus input
2023-06-20 11:56:40 +02:00
Nazar Hussain
0e93c07a51 ci: add support for the CI env for e2e tests (#5488)
* Add support for the CI env for e2e tests

* Update the port number e2e tests node

* Update the script

* Update the e2e script

* Stop the e2e tests env

* Update the script to stop env

* Add a timeout for port

* Redirect nohup output

* Redirect nohup output

* Update the process signal

* Move the run bash script to a file

* Remove the unwanted wait time

* Update the variaable name

* Update the script name

* Update the test env

* Update the e2e env to start from capella

* Increase the genesis delay

* Pass three epoch to fix the sync comittee availability

* Increase the wait epoch

* Wait for the 3rd epoch

* Increase timeout

* Add lodestar preset value

* Fix env variable

* Set the forks in incremental sequence

* Increase the timeout

* Move wait logic to test file

* Fix the geth version

* Allow to pass custom config to support custom network

* Fix lint error

* Add minimal preset for the e2e tests
2023-05-30 11:14:06 -04:00
Nico Flaig
c3b92d71e2 chore: fix dashboard job name variables (#5579) 2023-05-30 10:45:13 -04:00
Lion - dapplion
abc4b1ad54 ci: assert eslintrc rules are sorted (#5567)
Assert eslintrc is rules are sorted
2023-05-30 10:18:59 -04:00
Lion - dapplion
84903697c8 chore: set graphTooltip to shared crosshair (#5563)
Set graphTooltip to shared crosshair
2023-05-30 08:08:37 +07:00
Lion - dapplion
7b53ebd4a2 chore: add script to pull dashboards from remote API (#5525)
Update scripts
2023-05-24 11:57:54 -04:00
Nico Flaig
1602f67e3b chore: generate changelog based on conventional commits (#5487)
* Update known authors

* Generate changelog based on conventional commits

* Rename generate changelog script

* Update PR title checker types based on predefined sections

* Convert generate changelog script to ES module

* Update order of sections

* Update Changelog heading to h1

* Print out ignored commits with reason
2023-05-16 17:37:13 +02:00
Nico Flaig
9b6cab154b Fix grafana dashboard lint script (#5221)
* Fix grafana dashboard lint script

- Nested dashboard panels are now recursively checked
- Panel datasource must point to the datasource variable

* Run scripts/validate-grafana-dashboards.sh script
2023-03-02 08:53:49 -05:00
Cayman
d5c08e3ceb Allow new release create-rc based off stable branch (#5209) 2023-02-27 18:59:30 -05:00
Lion - dapplion
c8d244ff87 Expand block processor dashboard (#5169)
* Expand lodestar block processor dashboard

* Lint

* Add cache charts

* Update processor dashboard
2023-02-27 03:35:31 +00:00
Nico Flaig
6793305c50 Fix grafana dashboard validation (#5093)
fatal: option '--stat' must come before non-option arguments
2023-02-02 18:41:40 +08:00
tuyennhv
adb23091d1 Fix github action warnings (#5078) 2023-01-31 06:46:58 +08:00
Lion - dapplion
63355c1e5a Lint fix dashboards automatically (#5068)
* Validate grafana script fixes dashboards

* Run validate grafana dashboards with linter style

* diff on dashboards dir only
2023-01-27 09:04:29 -05:00
tuyennhv
50ea6817e7 Avoid set-output in workflows (#5002) 2023-01-13 11:02:13 -05:00
Lion - dapplion
70796d3ab8 Assert correct ESM module exports (#4895) 2022-12-10 07:52:00 -05:00
dadepo
03034ff77c Serve Lightclient related data via p2p (#4365)
* rename to LightClientBootstrap to keep consistent with spec

* updating types in preparation to start serving LightClientBootstrap via p2p resp/req

* should be able to serve LightClientBootstrap via p2p

* aligning types in preparation to be able to serve light client update via p2p

* added a comment to take care of error handling for light client bootstrap

* fix type error

* handle error when lighclientBootstrap cannot be returned

* Add ability to serve LightclientUpdate via p2p req/resp

* Aligning types in prep for being able to serve LightClientFinalityUpdate via p2p resp/req

* Added ability to serve LightClientFinalityUpdate via p2p req/resp

* Serving lightclientFinalityUpdate via p2p

* fix check types

* fix failing lightclient.test.ts test

* fix check-types check

* fix check-types check

* initial changes to have light_client_optimistic_update and light_client_optimistic_update available via the gossip domain

* adding placeholder for validating lightclient's gossip messages

* Added some validation to LightClientFinalityUpdate

* added more gossip validation

* fix check-types errors

* temp disable test

* Unit tests should now be passing

* explicitly binding this to function passed to the chain event emitter handler

* removed TODO comment after processing it

* undo removal of space

* LightClientOptimisticUpdate has no request

* update to return corrosponding ssz type to lightclient gossip type

* turn runtime error to compile time error

* extend gossipsub.test to include tests for LightClientOptimisticUpdate and LightClientFinalityUpdate

* Fix build failure

* Also unsubscribe lightclient's gossip global topics

* Logging topics for debugging in CI

* debugging in CI

* do not override zeroProtoBlock

* removing cli debugging changes

* run the network.test within altair

* split lightclient gossip validation to seperate files

* adding tests for validateLightClientOptimisticUpdate

* undo unintended changes

* Added Light Client Finality Update validation

* corrected type name to be aligned with spec

* extend onRequest with light client

* fix test

* properly setting signatureSlot

* wrapped getting onLightclientUpdate via res/req in a try catch

* Align light client objects naming with spec

* remove comment

* process some TODO

* Add ability to request lightClientBootstrap via Req/Resp

* added ability to request light client optimistic and finality update via req/res

* Add ability to request light client update message via Req/Res channel

* renabled skipped test

* process LightClientUpdate via SSE also

* undo unintended committed changes

* remove unnecessary promise resolve

* remove unnecessary promise resolve

* temp undo commit cd4b595 and c5ca43c

* Revert "temp undo commit cd4b595 and c5ca43c"

This reverts commit b44db38444.

* yield LightClientUpdate instead of LightClientUpdates

* removed unused type

* fix compilation in tests

* improve error handling for getOptimisticUpdate

* improve error handling for getFinalityUpdate

* avoid voiding promise. Fix lint errors

* Switch to debug level to prevent unnecessary PublishError.InsufficientPeers

* Adding back promises to api client functions

* resolved confilict/merged in unstable

* Move setting of latestForwardedFinalitySlot and latestForwardedOptimisticSlot from validation logic

* Use correct version for Res/Req

* Use correct version for Res/Req

* use one event stream

* removed redundant async

* Fix tests due to removal of async

* Fixed test

* Do not forward if local light client updates do not exist yet

* fix lightClientOptimisticUpdate.test and wait 1/3 slot before publishing

* Added tests for scenarios where validation does not fail for validateLightClientFinalityUpdate and validateLightClientOptimisticUpdate

* Remove redefinition of Root. Removed utility functions in test

* Passing in syncAggregate and signatureSlot instead of whole block

* Make getUpdates more flexible

* use strong equality check

* do not publish events if sync committee is below MIN_SYNC_COMMITTEE_PARTICIPANTS

* doGetUpdate => getUpdate. private => public

* Allow gaps in light client updates instead of throwing

* Address pr comments

* Remove light client latest cached slot

* Revert "Remove light client latest cached slot"

This reverts commit 50fe56f4ea.

* Use simple for loop

* Remove trailing slash from lightclient apis

* Fix finality update gossip validation

* fixing failing tests

* invalid with not matching local when no local update yet

* Limit REST getUpdates response to MAX_REQUEST_LIGHT_CLIENT_UPDATES

* unbind listeners on close

* removed the need to bind to this

* fix lint

* wait one third before publishing lc updates in on onSyncAggregate

* Revert "wait one third before publishing lc updates in on onSyncAggregate"

This reverts commit 003a2335f4.

* update waiting logic before publishing lc update to network

* making use of abort signal when sleeping

* only publish lc updates if node has atleast one sync committee member

* Remove stray comment

* Use strict equals

* More consistent naming

* Reorg reqresp methods

* Add light client server error

* Fix seconds to miliseconds typo

* Remove need for -1 default

* Remove unnecessary arrow function

* Allow to publish to zero peers

* Use spec name LightClientUpdatesByRange

* Clarify FINALITY_UPDATE_RECEIVED_TOO_EARLY math

* De-duplicate updateReceivedToEarly condition

* Update emit comments

* Fix typo in updateReceivedTooEarly

Co-authored-by: Cayman <caymannava@gmail.com>
Co-authored-by: dapplion <35266934+dapplion@users.noreply.github.com>
2022-10-28 19:08:12 +00:00
Lion - dapplion
168d46759a Split main dashboard (#4474)
* Split main dashboard

* Lint dashboards
2022-08-25 08:10:12 -05:00
Cayman
b2d6a55d94 Rename CLI flags for v1 (#4457)
* Rename `rootDir` to `dataDir`

* Refactor initializeOptionsAndConfig

* Remove old peerstore migration

* Fix rootDir

* Rename `metrics.enabled` to `metrics`

* Rename `api.rest` to `rest`

* Rename `chain.defaultFeeRecipient` to `suggestedFeeRecipient`

* Rename `network.discv5.enabled` to `discv5`

* Set many network flags as hidden

* Fix rest rename

* Change rest options order

* Remove rest alias

* Rename `builder.enabled` to `builder`

* More suggestedFeeRecipient

* Hide most chain options

* Rename `eth1.enabled` to `eth1`

* Remove eth1.providerUrl

* Hide eth1.depositContractDeployBlock

* More eth1.enabled

* More rest.enabled

* More rest.namespace

* More rest.address

* More rest.port

* More suggestedFeeRecipient

* Hide some beacon options

* Overhaul wss options

* Fix dataDir capitalization

* Review network flags

* Update logFile options

* Update wss options

* Drop aliases

* Rename keymanager.enabled

* Rename importKeystoresPath

* Fix beacon-node types

Co-authored-by: dapplion <35266934+dapplion@users.noreply.github.com>
2022-08-20 12:09:31 +00:00
Lion - dapplion
f04d2708a8 Drop typedocs (#4312)
* Remove @module tags

* Drop typedoc scripts
2022-07-17 10:19:29 -05:00
Cayman
e5dabac124 Rename packages using @lodestar namespace (#4231)
* Remove event handlers file

* exposing util module from the light-client package

* Rename packages using @lodestar namespace

* Fix linter errors

* Fix merge

Co-authored-by: dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: Dadepo Aderemi <dadepo@gmail.com>
2022-07-06 12:30:36 -05:00
Cayman
86b95a731d Enable rc dockerhub publish in await-release script (#4100)
Update await-release script to enable rc publish
2022-06-01 22:24:07 +05:30
Cayman
ebd668d474 Another fix for publish rc (#4099) 2022-06-01 11:08:01 -05:00
Cayman
06c852e89c Add bash assert_valid_rc script (#4096) 2022-06-01 13:52:19 +05:30
Lion - dapplion
510f3108e4 Adopt gitflow for Lodestar releases (#4071)
* Adopt gitflow for Lodestar releases

* Apply feedback

* Replace most mentions of `master` with `unstable`

* Tweak various parts of RELEASE.md

* Update CI

* Tweak dev release version handling

* Tweak workflow names

* Replace `nightly` with `dev`

* Replace `beta` with `rc`

* Fix publish for rc release and stable release only

* Remove stray "beta"

* Add code examples to RELEASE.md

* Clarify publish process

* Collapse 'Alternatives considered' section

* Move 'Details' header up one level

* Clarify publishing a release

* Tweak headings

* Fix hotfix section

* More clarifications

* Update examples in RELEASE.md

* More clarifications

* Fix formatting

* Run RELEASE.md through grammarly

* Change script name to release:publish

* Add create_rc script

* Add workflow_dispatch for create RC

* Add placeholder for other scripts

* Update RELEASE.md

* Update release create rc script

* Update script instructions

* create_rc script must not be run in CI

* Update release flow

* Add publish-rc workflow

* Apply suggestions from code review

Co-authored-by: Afr Schoe <58883403+q9f@users.noreply.github.com>

Co-authored-by: Cayman <caymannava@gmail.com>
Co-authored-by: Afr Schoe <58883403+q9f@users.noreply.github.com>
2022-05-30 10:22:00 -05:00
Cayman
531e2c2b9d Simplify release process (#4030)
* Simplify release process

* Remove old postrelease script

* Add lerna version check

* Tweak RELEASE.md

* Add force-publish to lerna version command
2022-05-25 01:51:42 +05:30
Lion - dapplion
d0a78a209c Re-org dashboards into common folder (#3905) 2022-04-10 21:07:08 +05:30
Lion - dapplion
d61d898d0d Bump to new gossipsub (#3858)
* Bump to new gossipsub

* Fix test type errors

* Add getMeshPeers method

* Cleanup test nodes on success and error

* Add allowPublishToZeroPeers option

* Add allowPublishToZeroPeers to dev options

* Add scripts to run dev servers

* Bump gossipsub

* Bump gossipsub

* Expose gossip peer score stats

* bump gossipsub

* Dump gossipsub score params

* Bump lodestar

* Add behaviourPenaltyThreshold to gossip scoring params

* Switch to latest gossipsub update

* Fix cli unit test

* Fix unknownBlockSync e2e test

* Update latest gossipsub

* Fix e2e - network addr in use

* Use latest gossipsub 3efae56c9d39ff3a047a7e6c65fa32e5756bebde

* Use latest gossipsub 039af54c7bf47396c1be414d9fa33aa2e8cc2697

* Increase meshMessageDeliveriesWindow and gossipsubIWantFollowupMs

* Set gossipsubIWantFollowupMs and meshMessageDeliveriesWindow 12s

* Reset gossipsub metric behaviourPenalty per scrape

* Compute score using lodestar score and gossipsub score (#3875)

* Refactor PeerRpcScoreStore: add PeerScore class

* Aggregate lodestarScore, gossipsubScore to compute final score

* updateGossipsubScores util and unit test

* Populate PeerScore on updateGossipsubScore

* Fix peerManager e2e test

* Fix test/sim/multiNodeSingleThread.test.ts

* Update latest gossipsub

* lodestar_gossip_mesh_peers_by_client_count metric

* Log sent peers in gossipsub.publishObject()

* Fix lodestar_gossip_mesh_peers_by_client_count metric

* Fix lodestar_gossip_mesh_peers_by_client_count metric

* Add asyncValidation=true option to gossipsub

* Fix sha256 usage

* Go with libp2p-gossipsub 0.14.0

Co-authored-by: Tuyen Nguyen <vutuyen2636@gmail.com>
Co-authored-by: Cayman <caymannava@gmail.com>
2022-04-05 17:32:11 +07:00
Lion - dapplion
1a4640db74 Enforce usage of node:* protocol with eslint (#3714)
* Restrict node imports without the node:* protocol

* Enforce usage of node protocol with eslint
2022-02-07 09:59:54 -06:00
Lion - dapplion
6a713019bf Fix release workflow (#3686)
* Checkout full history during release (#3539)

* Fix release workflow

* Add git tag commands as example

* Checkout full depth for changelog

Co-authored-by: Cayman <caymannava@gmail.com>
2022-02-01 15:29:54 -06:00
chainoperator
5d92233096 Use node:* import protocol for safer module resolution (#3667)
This PR uses `node:*` imports for `fs` and `path` modules as specified in [issue 3664](https://github.com/ChainSafe/lodestar/issues/3664).

Note that using `node:*` imports requires us to whitelist `node:fs` in the `import/core-modules` `eslint` setting. If we do not whitelist it then our linter fails because it can not identify `node:fs` as a node module.
2022-01-28 08:49:16 -06:00
Lion - dapplion
87639f8417 Add generate changelog script (#3598) 2022-01-12 09:46:29 -06:00
Lion - dapplion
148ac6f4ea Add build if changed script (#3543)
* Add build if changed script

* Remove stale comment
2021-12-21 11:11:40 +01:00
Lion - dapplion
f5d6f9f2e7 Add multi-node dashboard (#3503)
* Add ad hoc filter to dashboard

* Add multinode dashboard

* Enable auto-refresh

* Scan all dashboards for exemplar
2021-12-11 09:26:40 -06:00
Lion - dapplion
2287e82d90 Trigger release with tag push (#3504)
* Trigger release with tag push

* Fix variable in Get previous tag

* Add tag regex pattern
2021-12-10 17:39:01 +01:00
g11tech
4a8080926c inspecting lodestar.json with regexp to invalidate use of exemplar (#3192)
* exemplar check with regex

* heading change for linting grafana dash
2021-09-20 15:49:34 +02:00
Afr Schoe
28ea8ab348 github: ensure release script docker job depends on npm job (#3022)
* github: ensure release script docker job depends on npm job

* scripts: trimp v character from version tag

* github: docker push requires exactly one argument

* Update release.yml

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
2021-08-26 16:24:37 +02:00
Afr Schoe
3b36d7f982 github: allow release workflow to wait up to 15 minutes for npm package to publish (#3006)
* scripts: provide means to check versions in npm registry

* github: allow the release workflow to verify npm version availability

* github: await release for up to 15 minutes
2021-08-25 10:05:54 +02:00
Lion - dapplion
fde84b56bb Remove gitData script from docker build (#2815) 2021-07-06 13:24:09 -05:00
Cayman
1e68d39a97 Remove stale files (#2301) 2021-03-30 15:49:05 -05:00
dapplion
50afaffa78 Fix package rename 2021-03-24 10:48:13 +01:00
dapplion
563fd709f1 Remove mocha script 2021-03-07 12:42:44 +01:00
dapplion
b61a9f3ad7 Inject Lodestar version branch and commit on docker build 2021-02-27 15:11:23 +01:00
dapplion
9a611d669e Use artifact uploading 2020-10-30 11:09:05 +01:00
dapplion
641033dd4b Remove prometheus binary 2020-10-06 10:30:58 +02:00
dapplion
e5c9579258 Register ts-node and a custom test tsconfig 2020-08-22 21:02:15 +02:00