* Extended /admin/v1 RESP API with different option to look at current connected/relay/mesh state of the node
* Added score information for peer info retrievals
* add new unit test to validate that any peer can be retrieved
* add new discv5 test and better peer store management
* wakuPeerStore -> switch.peerStore
* simplify waku_peer_store, better logs and peer_manager enhancements
* feat: introduce `preset` option
Overwriting config from cluster-id will be deprecated as a second step.
* doc: improve preset doc
* Change `default` preset to `twn`
* Fixing lightpush publish logs stated it was legacy lightpush, also fix on wrong mounted protocol check.
* Fix lightpush v3 success report did not embed relayed peer count
* Fix test that missed the case of non returning relayed peers
* Separate new lightpush protocol
New RPC defined
Rename al occurence of old lightpush to legacy lightpush, fix rest tests of lightpush
New lightpush protocol added back
Setup new lightpush protocol, mounting and rest api for it
modified: apps/chat2/chat2.nim
modified: tests/node/test_wakunode_lightpush.nim
modified: tests/node/test_wakunode_sharding.nim
modified: tests/test_peer_manager.nim
modified: tests/test_wakunode_lightpush.nim
renamed: tests/waku_lightpush/lightpush_utils.nim -> tests/waku_lightpush_legacy/lightpush_utils.nim
renamed: tests/waku_lightpush/test_all.nim -> tests/waku_lightpush_legacy/test_all.nim
renamed: tests/waku_lightpush/test_client.nim -> tests/waku_lightpush_legacy/test_client.nim
renamed: tests/waku_lightpush/test_ratelimit.nim -> tests/waku_lightpush_legacy/test_ratelimit.nim
modified: tests/wakunode_rest/test_all.nim
renamed: tests/wakunode_rest/test_rest_lightpush.nim -> tests/wakunode_rest/test_rest_lightpush_legacy.nim
modified: waku/factory/node_factory.nim
modified: waku/node/waku_node.nim
modified: waku/waku_api/rest/admin/handlers.nim
modified: waku/waku_api/rest/builder.nim
new file: waku/waku_api/rest/legacy_lightpush/client.nim
new file: waku/waku_api/rest/legacy_lightpush/handlers.nim
new file: waku/waku_api/rest/legacy_lightpush/types.nim
modified: waku/waku_api/rest/lightpush/client.nim
modified: waku/waku_api/rest/lightpush/handlers.nim
modified: waku/waku_api/rest/lightpush/types.nim
modified: waku/waku_core/codecs.nim
modified: waku/waku_lightpush.nim
modified: waku/waku_lightpush/callbacks.nim
modified: waku/waku_lightpush/client.nim
modified: waku/waku_lightpush/common.nim
modified: waku/waku_lightpush/protocol.nim
modified: waku/waku_lightpush/rpc.nim
modified: waku/waku_lightpush/rpc_codec.nim
modified: waku/waku_lightpush/self_req_handler.nim
new file: waku/waku_lightpush_legacy.nim
renamed: waku/waku_lightpush/README.md -> waku/waku_lightpush_legacy/README.md
new file: waku/waku_lightpush_legacy/callbacks.nim
new file: waku/waku_lightpush_legacy/client.nim
new file: waku/waku_lightpush_legacy/common.nim
new file: waku/waku_lightpush_legacy/protocol.nim
new file: waku/waku_lightpush_legacy/protocol_metrics.nim
new file: waku/waku_lightpush_legacy/rpc.nim
new file: waku/waku_lightpush_legacy/rpc_codec.nim
new file: waku/waku_lightpush_legacy/self_req_handler.nim
Adapt to non-invasive libp2p observers
cherry pick latest lightpush (v1) changes into legacy lightpush code after rebase to latest master
Fix vendor dependencies from origin/master after failed rebase of them
Adjust examples, test to new lightpush - keep using of legacy
Fixup error code mappings
Fix REST admin interface with distinct legacy and new lightpush
Fix lightpush v2 tests
* Utilize new publishEx interface of pubsub libp2p
* Adapt to latest libp2p pubslih design changes. publish returns an outcome as Result error.
* Fix review findings
* Fix tests, re-added lost one
* Fix rebase
* Apply suggestions from code review
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* Addressing review comments
* Fix incentivization tests
* Fix build failed on libwaku
* Change new lightpush endpoint version to 3 instead of 2. Noticed that old and new lightpush metrics can cause trouble in monitoring dashboards so decided to give new name as v3 for the new lightpush metrics and change legacy ones back - temporarly till old lightpush will be decommissioned
* Fixing flaky test with rate limit timing
* Fixing logscope of lightpush and legacy lightpush
---------
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* chore: rename test file for eligibility tests
* add reputation manager
* add simple boolean reputation with dummy response
* set default reputation to true
* use reputation indicator term; remove unnecessary updateReputation
* use PushResponse in reputation manager
* add custom type for reputation
* add reputation update from response quality
* encode reputation indicators as Option[bool]
* add double-spend check for txid-based eligibility
* Apply suggestions from code review
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* split assert into two in double-spending test
* remove unnecessary import
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
---------
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* waku/waku_filter_v2/protocol.nim keeps track of the filter-client connections in Table[PeerId, Connection]
* waku/waku_filter_v2/protocol.nim starts listening for peer-left events in order to completely remove the previous Connection instance. Also, a new Connection is added when the filter-service starts publishing to its peers.
---------
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
* waku_filter_v2: idiomatic way run periodic subscription manager
* filter subscriptions: add more debug logs
* filter: make sure the custom start and stop procs are called
* make sure filter protocol is started if it is mounted
* filter: dial push connection on subscribe only
* reduce max num filter peers from 1000 to 100
* adapt filter tests
* waku_peer_exchange protocol remove temporary debug logs
* store test adaptations because the tests were using future times
* waku_store_sync.nim, test_waku_archive, test_rln_group_manager_onchain.nim nph (unrelated change)
Implement data structures and tests for checking transaction eligibility based on tx hash. This work will be continues in future PRs. All code added in this PR is only used in tests.
* feat: add simple txid-based eligibility check with hard-coded params (#3166)
* use new proc to generate eligibility status
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
* minor fixes
* add comments to clarify eligibility definition
* use Address.fromHex conversion from eth-web3
* move isEligible to common
* refactor: avoid result and unnecesary branching
* define const for simple transfer gas usage
* avoid unnecessary parentheses
* chore: run nph linter manually
* refactor, move all hard-coded constants to tests
* use Result type in eligibility tests
* use standard method of error handling
* make try-block smaller
* add a try-block in case of connection failure to web3 provider
* make queries to web3 provider in parallel
* move Web3 provider RPC URL into env variable
* remove unused import
* rename functions
* use await in async proc
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
* add timeout to tx receipt query
* parallelize queries for tx and txreceipt
* make test txids non public
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* use assert in txid i13n test
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* use parentheses when calling verb-methods without arguments
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* remove unused import
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* use init for stack-allocated objects
* add txReceipt error message to error
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* introduce eligibility manager
* [WIP] use Anvil for eligibility testing
* add eligibility test with contract deployment tx
* add eligibility test with contract call
* add asyncSetup and asyncTeardown for eligibility tests
* minor refactor
* refactor tests for onchain group manager with asyncSetup and asyncTeardown
* minor refactor
* remove unnecessary defer in asyncTeardown
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* remove unnecessary call in test (moved to asyncTeardown)
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* add comment justidying the use of discard
* rename file txid_proof to eligibility_manager
---------
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* undo apt install libpcre (not circuit-relay related.)
* nat.nim: protect against possible exceptions when calling getExternalIP
* new external CLI argument, isRelayClient
* waku factory change to mount circuit hop proto by default
* waku_node: move autonat_service to a separate module
* Enhanced peer-ex protocol - added rate limiting, added response status and desc to the rpc
* Better error result handling for PeerEx request, adjusted tests
* Refactored RateLimit configuration option for better CLI UX - now possible to set separate limits per protocol. Adjusted mountings. Added and adjusted tests
* Fix libwaku due to changes of error return type of fetchPeerExchangePeers
* Fix rate limit setting tests due to changed defaults
* Introduce new gauge to help dasboard effectively show current rate limit applied for protocol
* Adjust timeing in filter rate limit test to let macos CI test run ok.
* Address review findings, namings, error logs, removed left-overs
* Changes to reflect latest spec agreement and changes. PeerExchange RPC is changed the now respond structure will contain status_code and status_desc.