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>
* 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.
* queue driver refactor (#2753)
* chore(archive): archive refactor (#2752)
* chore(archive): sqlite driver refactor (#2754)
* chore(archive): postgres driver refactor (#2755)
* chore(archive): renaming & copies (#2751)
* posgres legacy: stop using the storedAt field
* migration script 6: we still need the id column
The id column is needed because it contains the message digest
which is used in store v2, and we need to keep support to
store v2 for a while
* legacy archive: set target migration version to 6
* waku_node: try to use wakuLegacyArchive if wakuArchive is nil
* node_factory, waku_node: mount legacy and future store simultaneously
We want the nwaku node to simultaneously support store-v2
requests and store-v3 requests.
Only the legacy archive is in charge of archiving messages, and the
archived information is suitable to fulfill both store-v2 and
store-v3 needs.
* postgres_driver: adding temporary code until store-v2 is removed
---------
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>
* chore: remove deprecated legacy filter protocol
* fix: do not use legacy import in test
* fix: remove legacy test references
* fix: more test fixes, starting filter client
* fix: sigh. more references to remove.
* fix: fix dereferencing error
* fix: fix merge mess up
* fix: sigh. merge tool used tabs.
* fix: more peer manager tests needed fixing
---------
Co-authored-by: Hanno Cornelius <hanno@status.im>
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
* Add ligthpush payload tests.
* Add end to end lightpush tests.
* updating vendor/nim-unittest2 to protect against core dump issue
* Enable "Valid Payload Sizes" test again
---------
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
* Refactor of FilterV2 subscription handling and maintenance with addition subscription time-to-live support.
Fixed all tests and reworked where subscription handling changes needed it.
Adapted REST API /admin filter subscription retrieve to new filter subscription structure.
* Fix tests and PR comments
* Added filter v2 subscription timeout tests and fixed
* Fix review comments and suggestions. No functional change.
* Remove leftover echoes from test_rest_admin
* Fix failed legacy filter tests due to separation of mounting the filters.
* Small fixes, fix naming typo, removed duplicated checks in test
* on_chain/group_manager: use .async: (raises:[Exception]).
* bump nim-dnsdisc
* update nim-chronos to the latest state
* chat2.nim: catch any possible exception when stopping
* chat2bridge.nim: make it to compile after vendor bump
* ValidIpAddress (deprecated) -> IpAddress
* vendor/nim-libp2p additional bump
* libwaku: adapt to vendor bump
* testlib/wakunode.nim: adapt to vendor bump (ValidIpAddress -> IpAddress)
* waku_node: avoid throwing any exception from stop*(node: WakuNode)
* test_confutils_envvar.nim: ValidIpAddress -> IpAddress
* test_jsonrpc_store: capture exception
* test_rln*: handling exceptions
* adaptation to make test_rln_* to work properly
* signature enhancement of group_manager methods