1944 Commits

Author SHA1 Message Date
Sergei Tikhomirov
a4e92a3d02
feat: incentivization PoC: client-side reputation system basics (#3293)
* 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]
2025-02-20 16:07:21 +01:00
gabrielmer
a3876f1ec4
fix: libwaku's invalid waku message error handling (#3301) 2025-02-17 18:37:43 +02:00
Ivan FB
091024b376
chore: better proof handling in REST (#3286)
* better proof handling in REST
2025-02-14 11:14:38 +01:00
gabrielmer
85da5efa13
chore: supporting parallel libwaku requests (#3296) 2025-02-13 15:08:32 +02:00
Ivan FB
35ebfa8d66
lightpush enhance log when handling request (#3297) 2025-02-13 00:48:36 +01:00
gabrielmer
b792bee695
fix: libwaku store request parsing (#3294) 2025-02-12 18:35:50 +02:00
Ivan FB
f0e8cf521a
add waku-rlnv2-contract as vendor dependency (#3289)
The waku-rlnv2-contract commit (a576a89) that is being added is the one
that generated the currently deployed waku network
2025-02-10 23:30:56 +01:00
Ivan FB
9a8e1ef21e
chore: dbconn truncate possible too long error messages (#3283)
* also: dbconn restrict the max metric label value to 128
2025-02-07 20:23:31 +01:00
Prem Chaitanya Prathi
48f04d8033
fix: make light client examples work with sandbox fleet (#3237) 2025-02-07 11:04:48 +05:30
Ivan FB
d391357ed7
Revert "chore: waku_archive add protection against queries longer than 24h" (#3278)
This reverts commit a4d71718a250018fbae7b287400b1d6b18f04bee.
2025-02-06 17:44:12 +01:00
Ivan FB
ce7f09a35f
chore: refactor filter to react when the remote peer closes the stream (#3281)
Better control when the remote peer closes the WakuFilterPushCodec
stream.
For example, go-waku closes the stream for every received message.
On the other hand, js-waku keeps the stream opened.
Therefore, we support both scenarios.
2025-02-06 17:21:23 +01:00
gabrielmer
8a7e602543
fix: avoid sending relay callbacks if relay is disabled (#3276) 2025-02-05 18:16:37 +02:00
NagyZoltanPeter
81a19c397c
Bump nim-chronicles to latest and greates - was missing from previous version bumps (#3274) 2025-02-03 14:35:56 +01:00
Sergei Tikhomirov
c142994772
feat: incentivization POC: add double-spend check for txid-based eligibility (#3264)
* 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>
2025-01-31 18:53:46 +01:00
Ivan FB
46747fd496
chore: filter remove all subscription from a peer that is leaving (#3267)
* 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>
2025-01-31 17:01:55 +01:00
Ivan FB
1d6ef31f56
peer_manager simple cleanup (#3266) 2025-01-31 16:34:53 +01:00
Simon-Pierre Vivier
42fd6b8278
feat: waku sync shard matching check (#3259) 2025-01-30 08:46:34 -05:00
NagyZoltanPeter
fa31916348
Update notice of build from source pre-requisites for successful fedora builds (#3265) 2025-01-30 14:36:04 +01:00
gabrielmer
9c209b4c3b
chore: sending msg hash as string on libwaku message event (#3234) 2025-01-30 10:15:31 +02:00
gabrielmer
aaf3c00706
chore: compiling with skipParentCfg (#3262) 2025-01-29 17:57:35 +02:00
Ivan FB
287e9b12ca
fix: filter - enhancements in subscription management (#3198)
* 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
2025-01-28 15:37:33 +01:00
Ivan FB
f8a233381e
chore: bump dependencies for v0.35 (#3255)
Changes:
	modified:   .gitmodules
	modified:   tests/waku_discv5/utils.nim
	modified:   tests/waku_enr/utils.nim
	modified:   tests/waku_rln_relay/test_rln_group_manager_onchain.nim
	modified:   tests/waku_rln_relay/utils.nim
	modified:   tests/waku_rln_relay/utils_onchain.nim

        modified:   vendor/nim-chronicles
	modified:   vendor/nim-eth
	modified:   vendor/nim-http-utils
	modified:   vendor/nim-json-rpc
	modified:   vendor/nim-json-serialization
	modified:   vendor/nim-libp2p - 1.8.0!
	modified:   vendor/nim-metrics
	new file:   vendor/nim-minilru
	modified:   vendor/nim-nat-traversal
	modified:   vendor/nim-presto
	modified:   vendor/nim-secp256k1
	modified:   vendor/nim-serialization
	modified:   vendor/nim-stew
	modified:   vendor/nim-taskpools
	modified:   vendor/nim-testutils
	modified:   vendor/nim-toml-serialization
	modified:   vendor/nim-unicodedb
	modified:   vendor/nim-unittest2
	modified:   vendor/nim-web3 - from distinct branch that solves Ethereum ABI issue.
	modified:   vendor/nim-websock
	modified:   vendor/nim-zlib
	modified:   vendor/nimcrypto
	modified:   waku.nimble

        modified:   waku/common/enr/builder.nim
	modified:   waku/common/enr/typed_record.nim
	modified:   waku/common/utils/nat.nim
	modified:   waku/discovery/waku_discv5.nim
	modified:   waku/waku_rln_relay/conversion_utils.nim
	modified:   waku/waku_rln_relay/group_manager/on_chain/group_manager.nim
	modified:   waku/waku_rln_relay/rln/wrappers.nim
	modified:   waku/waku_rln_relay/rln_relay.nim

* Eliminate C compilation issue with chat2bridge due to an overcomplicating import from json_rpc instead of using std/json
* Adapt ENR Record handling to new interface of nim-eth
* Fix chrash in group_manager on_chain
* Fix signature of register and MemberRegister to UInt256, check transaction success in register
* Upgrade json-rpc and serialization
* Update to match latest enr and nat interface
* Using of extracted result of contract macro - with necessary adaption
* Bump nim-chornicles, nim-libp2p, nimcrypto
* Bump nim-web3, nim-eth and deps - on_chain/group_manager.nim adaption
* Added status-im/nim-minilru submodule required by latest nim-eth
Fixing tests.
* group_manager: adapt smart contract param types
* update web3 vendor
* bump vendors for v0.35.0
* protobuf.nim: fix compilation error after nim-libp2p bump
* changes to make it compile after rebase from master
---------

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2025-01-28 10:04:34 +01:00
Ivan FB
b406b7b2ac
archive enhance logging (#3258) 2025-01-27 22:00:41 +01:00
Ivan FB
998f040fdb
move mount store before relay and rln relay (#3257)
This is needed to make a quick creation of the messages
table, before the event rln sync kicks off. With that,
we avoid having errors from postgres-exporter (nwaku-compose)
complaining about non-existing messages table.
2025-01-27 13:12:34 +01:00
Ivan FB
a4d71718a2
chore: waku_archive add protection against queries longer than 24h (#3256)
* 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)
2025-01-27 10:44:59 +01:00
Simon-Pierre Vivier
7f64dc03aa
feat: waku store sync 2.0 config & setup (#3217) 2025-01-24 11:46:11 -05:00
gabrielmer
81f24cc252
chore: separating heaptrack from debug build (#3249) 2025-01-24 11:14:37 +01:00
Simon-Pierre Vivier
6ee494d902
feat: waku store sync 2.0 protocols & tests (#3216) 2025-01-23 16:13:26 -05:00
Simon-Pierre Vivier
54a7a68754
feat: waku store sync 2.0 storage & tests (#3215) 2025-01-23 10:39:23 -05:00
gabrielmer
dfd06fa726
chore: adding debug flag to makefile (#3248) 2025-01-23 12:11:54 +01:00
Simon-Pierre Vivier
29fda2dab7
feat: waku store sync 2.0 common types & codec (#3213) 2025-01-22 11:08:23 -05:00
Sergei Tikhomirov
505ec84ce8
feat: add txhash-based eligibility checks for incentivization PoC (#3166)
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>
2025-01-22 11:16:49 +01:00
Darshan K
2942782f95
chore: capping mechanism for relay and service connections (#3184) 2025-01-21 11:29:52 +05:30
AYAHASSAN287
6d167dd2ed
chore: adding new job in the CI.yml file (#3193) 2025-01-20 16:54:00 +01:00
gabrielmer
2ce2453545
fix: avoid double db migration for sqlite (#3244) 2025-01-20 16:13:20 +01:00
Anton Iakimov
122e0f32dd
dosc: fix wakudev hostname 2025-01-17 17:47:49 +01:00
gabrielmer
bfd60ceab4
chore: adding extra migration to sqlite and improving error message (#3240) 2025-01-16 16:10:28 +01:00
Ivan FB
9c0ad85179
chore: optimize libwaku size (#3242)
* avoid compile TRACE level to reduce libwaku size
* waku_rln_relay/constants.nim: avoid adding constant seq that is used in tests only
* ci:yml USE_LIBBACKTRACE=0 to force -d:debug when running tests
2025-01-16 10:54:10 +01:00
Ivan FB
0e0fcfb1a5
chore: golang example end using negentropy dependency plus simple readme.md (#3235)
* avoid dependency with libpcre by using regex module
2025-01-15 10:32:22 +01:00
Ivan FB
625c8ee51b
chore: libwaku tweaks (#3233)
* make lightpush return msg hash after successful publish
* libwaku avoid the use of string
* library alloc.nim allocate memory when nil cstring is passed
* libwaku store_request remove extra destroyShared(self)
2025-01-08 20:52:44 +01:00
gabrielmer
e81a5517be
feat: connection change event (#3225) 2025-01-08 18:53:00 +01:00
richΛrd
d932dd10cc
feat(libwaku): add protected topic (#3211) 2025-01-07 09:29:39 -04:00
Ivan FB
29726bfbda
Update prepare_release.md add waku-rust-bindings step (#3229) 2025-01-06 22:46:21 +01:00
Ivan FB
bb5988e51d
test: test_wakunode_rln_relay use waitForNullifierLog in all tests avoid flaky (#3227) 2025-01-06 13:47:17 +01:00
Ivan FB
04a5355631
libwaku invoke callback within waku_destroy (#3228) 2025-01-03 16:13:26 +01:00
Ivan FB
b956d0b408
chore: add comment to clarify where contract.nim comes from (#3226) 2025-01-03 12:41:55 +01:00
Ivan FB
22ce9ee872
chore: enhance libwaku store protocol and more (#3223)
* json_message_event: avoid converting a WakuMessageHash into 0x...
* waku_thread: wait until the waku thread completely received the request
* waku_thread: add missing deallocShared
* libwaku avoid nonsense onReceivedMessage cb in waku_relay_publish
2025-01-03 12:26:46 +01:00
Ivan FB
04df6849d4
extend rust example with waku_start (#3224) 2024-12-26 19:37:43 +01:00
gabrielmer
6020a673b0
feat: topic health tracking (#3212) 2024-12-24 11:47:38 +01:00
Ivan FB
6627e34e52
chore: update prepare_release.md (#3218) 2024-12-18 11:54:59 +01:00