Skip to content
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

Sync master #1073

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
13e2d7a
feat: make `criteriaFN` public (#942)
richard-ramos Dec 4, 2023
5a5ee51
feat: include pubsubTopics supported by peer in getPeers REST API (#…
chaitanyaprem Dec 6, 2023
021265e
feat: fill msg timestamp while appending RLN proof it is not set (#940)
chaitanyaprem Dec 6, 2023
f0ed5e3
fix(store): set pagesize behavior match nwaku (#944)
richard-ramos Dec 6, 2023
6ab2cfb
fix: take into account the ENR seq to determine if a peer is new or n…
richard-ramos Dec 6, 2023
48ab9e6
fix: number of connected peers per topic (#948)
richard-ramos Dec 6, 2023
d7c7255
refactor: shard LRU for storing peers by shard (#840)
harsh-98 Dec 6, 2023
fd4df92
fix(lightpush): register lightpush protocol when instantiated (#951)
richard-ramos Dec 8, 2023
e340337
fix: use https instead of ssh for submodules
richard-ramos Dec 8, 2023
0ba1b63
chore: remove bridging topics feature (#949)
richard-ramos Dec 9, 2023
c403388
fix: remove extremely noisy logs (#956)
richard-ramos Dec 11, 2023
5d1477d
fix: hash calculation of message to include timestamp (#959)
kaichaosun Dec 13, 2023
0218169
fix: remove more noisy logs from discv5 (#961)
richard-ramos Dec 13, 2023
097123a
chore: lightpush tests coverage improvement (#957)
romanzac Dec 15, 2023
5e3c9fd
feat(c-bindings): support creating multiple instances (#929)
richard-ramos Dec 15, 2023
b4ba7b7
chore: stop light filter node by default (#964)
kaichaosun Dec 21, 2023
4ef0c75
fix: use node's clusterId when adding peer from admin REST API & don'…
chaitanyaprem Jan 2, 2024
02e2c59
fix: return appropriate error code for filter subscribe ping (#975)
chaitanyaprem Jan 2, 2024
2a2e8dc
fix: use updated zerokit-rln with epoch as 1 sec as per TWN spec (#976)
chaitanyaprem Jan 2, 2024
c00b218
chore: add retry mechanism for rpc calls and rename db function (#966)
richard-ramos Jan 2, 2024
4f8ed17
fix: ENR seq check to skip adding already existing peer (#978)
chaitanyaprem Jan 3, 2024
b5068b4
feat: relay msg size (#963)
chaitanyaprem Jan 3, 2024
bad57fc
fix: get peers api to not include own node ID as peer (#974)
chaitanyaprem Jan 3, 2024
71aec6d
feat: metrics dashboard (#980)
chaitanyaprem Jan 3, 2024
ec468e0
chore: update examples with autosharding and static sharding (#986)
chaitanyaprem Jan 3, 2024
6141f94
fix: presist lastProcessedBlock correctly when no rln events are proc…
chaitanyaprem Jan 3, 2024
a327e56
fix: return error while serializing rln metadata in case chainID is 0…
chaitanyaprem Jan 3, 2024
846183d
chore: use nwaku's db format (#965)
richard-ramos Jan 3, 2024
adda1cf
fix: handle existing static peer discovered with ENR that causes cras…
chaitanyaprem Jan 4, 2024
ff68934
chore: improve light client logging (#992)
richard-ramos Jan 4, 2024
68c0ee2
chore: store tests coverage improvement (#993)
romanzac Jan 5, 2024
4e19d93
chore: increase maxContentFilter limit for Filter protocol to 100 (#1…
chaitanyaprem Jan 8, 2024
369a025
fix: use both filter and legacyFilter flags to determine if filter is…
chaitanyaprem Jan 8, 2024
82fc800
feat: parameterizable number of connections per IP (#994)
richard-ramos Jan 8, 2024
75f975c
chore: RLN tests coverage improvement (#1003)
romanzac Jan 11, 2024
faf046e
chore: bumped libp2p and pubsub to 0.32.2 and 0.10 respectively (#987)
chaitanyaprem Jan 12, 2024
0723ff9
feat: Enable immediate dial termination by reusing passed context in …
qfrank Jan 15, 2024
190d8e8
chore: RLN tests coverage improvement for node gm (#1009)
romanzac Jan 21, 2024
5fdd0da
chore: set log level for all loggers based on logger passed (#1011)
chaitanyaprem Jan 25, 2024
3be0edb
feat: support multiple peer selection for filter client (#1005)
chaitanyaprem Jan 26, 2024
0f00fb8
fix: update lastProcessedBlock even if no RLN membership event is pre…
chaitanyaprem Jan 26, 2024
b647314
chore: add logs for peer connection backoff (#1018)
chaitanyaprem Jan 30, 2024
0c27742
chore: example update (#1012)
chaitanyaprem Feb 1, 2024
2e7a82e
feat: peer exchange filter by shard (#1026)
chaitanyaprem Feb 2, 2024
c09bd83
chore: add rate limiter option to lightpush (#1024)
richard-ramos Feb 5, 2024
4f232c4
feat: topic health reporting (#1027)
chaitanyaprem Feb 8, 2024
75a2aee
chore: upgrade CI from Nix 2.14 to 2.19
jakubgs Feb 13, 2024
8e95f75
chore(ci): drop build discord noficiation
jakubgs Feb 14, 2024
57cf95c
chore: remove RPC server (#1008)
richard-ramos Feb 16, 2024
d65a836
chore: drop legacy filter support (#1037)
richard-ramos Feb 20, 2024
0bdd359
chore: add artificial delay to peer-exchange (#1038)
richard-ramos Feb 21, 2024
0ba0f1f
refactor: use ttl of 5m for subscriptions (#1041)
richard-ramos Feb 22, 2024
d4bda12
chore: fix lightclient example (#1039)
chaitanyaprem Mar 4, 2024
4d828bd
feat(peer-exchange): rate limit (#1043)
richard-ramos Mar 11, 2024
bdf10a4
chore: peer exchange tests coverage improvement (#1046)
romanzac Mar 11, 2024
32be835
chore(metadata): handle deprecated shards field (#1050)
richard-ramos Mar 12, 2024
bdf44c0
fix(metadata): only verify peer metadata on relay (#1052)
richard-ramos Mar 14, 2024
3074cdb
fix: verify if metadata exists before checking for shard mismatch (#1…
richard-ramos Mar 16, 2024
4b9e363
chore: peermanager tests coverage improvement (#1035)
romanzac Mar 18, 2024
afa124e
fix: service slot tests (#1058)
romanzac Mar 18, 2024
7d767c0
fix: service slot test failure - regression (#1062)
romanzac Mar 20, 2024
826c7fb
chore: switch wakuv2 fleet to waku
yakimant Mar 11, 2024
6f1280e
fix: data race reported in #1070 (#1072)
chaitanyaprem Mar 25, 2024
327391a
fix: handle discv5 udp port 0 (#1069)
richard-ramos Mar 25, 2024
dcd802c
chore: update go-discover (#1066)
richard-ramos Mar 25, 2024
83efe65
chore: discv5 tests coverage improvement (#1051)
romanzac Mar 26, 2024
b199b08
fix: include ephemeral flag in REST message fetch and post (#1071)
chaitanyaprem Mar 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
- '.github/workflows/**'
- 'Makefile'
- 'libs/**'
- 'go.mod'
- 'go.sum'
- 'flake.nix'
- 'examples/**'

v2:
- 'waku/**'
Expand All @@ -37,6 +41,7 @@ jobs:

docker:
- 'docker/**'
- 'Dockerfile'

outputs:
common: ${{ steps.filter.outputs.common }}
Expand Down Expand Up @@ -161,8 +166,3 @@ jobs:
run: |
docker compose -f .github/docker-compose/ganache.yml up -d
make test-onchain${{ matrix.tests == 'test-with-race' && '-with-race' || '' }}

- name: "Run tests with postgres"
run: |
docker compose -f .github/docker-compose/postgres.yml up -d
make test-postgres${{ matrix.tests == 'test-with-race' && '-with-race' || '' }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pkg/*

# output binaries
go-waku
examples/basic2/basic2
examples/filter2/filter2
examples/basic-relay/build/basic-relay
examples/filter2/build/filter2
examples/noise/build/
examples/noise/noise

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/waku-org/waku-rln-contract.git
[submodule "waku/v2/protocol/waku-proto"]
path = waku/v2/protocol/waku-proto
url = git@github.com:waku-org/waku-proto.git
url = https://github.com/waku-org/waku-proto
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ docker-image:
docker build --tag $(DOCKER_IMAGE_NAME) \
--build-arg="GIT_COMMIT=$(shell git rev-parse HEAD)" .

build-example-basic2:
cd examples/basic2 && $(MAKE)
build-example-basic-relay:
cd examples/basic-relay && $(MAKE)

build-example-chat-2:
cd examples/chat2 && $(MAKE)
Expand All @@ -130,7 +130,7 @@ build-example-noise:
build-example-rln:
cd examples/rln && $(MAKE)

build-example: build-example-basic2 build-example-chat-2 build-example-filter2 build-example-c-bindings build-example-noise build-example-rln
build-example: build-example-basic-relay build-example-chat-2 build-example-filter2 build-example-c-bindings build-example-noise build-example-rln

static-library:
@echo "Building static library..."
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ nix develop
docker run -i -t -p 60000:60000 -p 9000:9000/udp \
wakuorg/go-waku:latest \
--dns-discovery \
--dns-discovery-url enrtree://ANEDLO25QVUGJOUTQFRYKWX6P4Z4GKVESBMHML7DZ6YK4LGS5FC5O@prod.wakuv2.nodes.status.im \
--dns-discovery-url enrtree://AIRVQ5DDA4FFWLRBCHJWUWOO6X6S4ZTZ5B667LQ6AJU6PEYDLRD5O@sandbox.waku.nodes.status.im \
--discv5-discovery
```
or use the [image:tag](https://hub.docker.com/r/wakuorg/go-waku/tags) of your choice.
Expand Down
45 changes: 0 additions & 45 deletions ci/Jenkinsfile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -66,55 +66,10 @@ pipeline {
}
}
post {
success { script {
discordNotify(
header: 'Go-Waku build successful!',
cred: 'discord-waku-deployments-webhook',
)
} }
always { cleanWs() }
}
}

def discordNotify(Map args=[:]) {
def opts = [
header: args.header ?: 'Deployment successful!',
cred: args.cred ?: null,
]
def repo = [
url: GIT_URL.minus('.git'),
branch: GIT_BRANCH.minus('origin/'),
commit: GIT_COMMIT.take(8),
prev: (
env.GIT_PREVIOUS_SUCCESSFUL_COMMIT ?: env.GIT_PREVIOUS_COMMIT ?: 'master'
).take(8),
]
wrap([$class: 'BuildUser']) {
BUILD_USER_ID = env.BUILD_USER_ID
}
withCredentials([
string(
credentialsId: opts.cred,
variable: 'DISCORD_WEBHOOK',
),
]) {
discordSend(
link: env.BUILD_URL,
result: currentBuild.currentResult,
webhookURL: env.DISCORD_WEBHOOK,
title: "${env.JOB_NAME}#${env.BUILD_NUMBER}",
description: """
${opts.header}
Image: [`${IMAGE_NAME}:${IMAGE_TAG}`](https://hub.docker.com/r/${IMAGE_NAME}/tags?name=${IMAGE_TAG})
Branch: [`${repo.branch}`](${repo.url}/commits/${repo.branch})
Commit: [`${repo.commit}`](${repo.url}/commit/${repo.commit})
Diff: [`${repo.prev}...${repo.commit}`](${repo.url}/compare/${repo.prev}...${repo.commit})
By: [`${BUILD_USER_ID}`](${repo.url}/commits?author=${BUILD_USER_ID})
""",
)
}
}

def getDefaultImageTag(currentValue) {
switch (env.JOB_BASE_NAME) {
case 'docker-latest': return 'latest'
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.nix-flake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library '[email protected]'

pipeline {
agent {
label 'linux && nix-2.14 && x86_64'
label 'linux && nix-2.19 && x86_64'
}

options {
Expand Down
80 changes: 16 additions & 64 deletions cmd/waku/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
cli "github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"github.com/waku-org/go-waku/waku/cliutils"
"github.com/waku-org/go-waku/waku/v2/node"
)

var (
Expand Down Expand Up @@ -234,11 +235,18 @@ var (
})
AgentString = altsrc.NewStringFlag(&cli.StringFlag{
Name: "agent-string",
Value: "go-waku",
Value: node.UserAgent,
Usage: "client id to advertise",
Destination: &options.UserAgent,
EnvVars: []string{"WAKUNODE2_AGENT_STRING"},
})
IPColocationLimit = altsrc.NewIntFlag(&cli.IntFlag{
Name: "ip-colocation-limit",
Value: node.DefaultMaxConnectionsPerIP,
Usage: "max number of allowed peers from the same IP. Set it to 0 to remove the limitation.",
Destination: &options.IPColocationLimit,
EnvVars: []string{"WAKUNODE2_IP_COLOCATION_LIMIT"},
})
Relay = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "relay",
Value: true,
Expand All @@ -264,15 +272,6 @@ var (
Destination: &options.Relay.ContentTopics,
EnvVars: []string{"WAKUNODE2_CONTENT_TOPICS"},
})
BridgeTopics = altsrc.NewGenericFlag(&cli.GenericFlag{
Name: "bridge-topics",
Usage: "Bridge two pubsub topics, from_topic:to_topic. Argument may be repeated.",
EnvVars: []string{"WAKUNODE2_BRIDGE_TOPIC"},
Value: &cliutils.BridgeTopicSlice{
Values: &options.Relay.BridgeTopics,
},
Hidden: true,
})
ProtectedTopics = cliutils.NewGenericFlagMultiValue(&cli.GenericFlag{
Name: "protected-topic",
Usage: "Topics and its public key to be used for message validation, topic:pubkey. Argument may be repeated.",
Expand All @@ -295,6 +294,13 @@ var (
Destination: &options.Relay.MinRelayPeersToPublish,
EnvVars: []string{"WAKUNODE2_MIN_RELAY_PEERS_TO_PUBLISH"},
})
MaxRelayMsgSize = altsrc.NewStringFlag(&cli.StringFlag{
Name: "max-msg-size",
Value: "150KB",
Usage: "Maximum message size. Supported formats are B, KiB, KB, MiB. If no suffix, default is bytes",
Destination: &options.Relay.MaxMsgSize,
EnvVars: []string{"WAKUNODE2_MAX_RELAY_MSG_SIZE"},
})
StoreNodeFlag = cliutils.NewGenericFlagMultiValue(&cli.GenericFlag{
Name: "storenode",
Usage: "Multiaddr of a peer that supports store protocol. Option may be repeated",
Expand Down Expand Up @@ -358,26 +364,6 @@ var (
Destination: &options.Filter.Timeout,
EnvVars: []string{"WAKUNODE2_FILTER_TIMEOUT"},
})
FilterLegacyFlag = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "legacy-filter",
Usage: "Use filter protocol (legacy)",
Destination: &options.Filter.UseV1,
EnvVars: []string{"WAKUNODE2_USE_LEGACY_FILTER"},
})
FilterLegacyLightClient = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "legacy-filter-light-client",
Usage: "Don't accept legacy filter subscribers",
Destination: &options.Filter.DisableFullNode,
EnvVars: []string{"WAKUNODE2_LEGACY_FILTER_LIGHT_CLIENT"},
})
FilterLegacyNode = cliutils.NewGenericFlagMultiValue(&cli.GenericFlag{
Name: "legacy-filternode",
Usage: "Multiaddr of a peer that supports legacy filter protocol. Option may be repeated",
Value: &cliutils.MultiaddrSlice{
Values: &options.Filter.NodesV1,
},
EnvVars: []string{"WAKUNODE2_LEGACY_FILTERNODE"},
})
LightPush = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "lightpush",
Usage: "Enable lightpush protocol",
Expand Down Expand Up @@ -493,40 +479,6 @@ var (
Destination: &options.Metrics.Port,
EnvVars: []string{"WAKUNODE2_METRICS_SERVER_PORT"},
})
RPCFlag = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "rpc",
Usage: "Enable the rpc server",
Destination: &options.RPCServer.Enable,
EnvVars: []string{"WAKUNODE2_RPC"},
})
RPCPort = altsrc.NewIntFlag(&cli.IntFlag{
Name: "rpc-port",
Value: 8545,
Usage: "Listening port of the rpc server",
Destination: &options.RPCServer.Port,
EnvVars: []string{"WAKUNODE2_RPC_PORT"},
})
RPCAddress = altsrc.NewStringFlag(&cli.StringFlag{
Name: "rpc-address",
Value: "127.0.0.1",
Usage: "Listening address of the rpc server",
Destination: &options.RPCServer.Address,
EnvVars: []string{"WAKUNODE2_RPC_ADDRESS"},
})
RPCRelayCacheCapacity = altsrc.NewIntFlag(&cli.IntFlag{
Name: "rpc-relay-cache-capacity",
Value: 30,
Usage: "Capacity of the Relay REST API message cache",
Destination: &options.RPCServer.RelayCacheCapacity,
EnvVars: []string{"WAKUNODE2_RPC_RELAY_CACHE_CAPACITY"},
})
RPCAdmin = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "rpc-admin",
Value: false,
Usage: "Enable access to JSON-RPC Admin API",
Destination: &options.RPCServer.Admin,
EnvVars: []string{"WAKUNODE2_RPC_ADMIN"},
})
RESTFlag = altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "rest",
Usage: "Enable Waku REST HTTP server",
Expand Down
11 changes: 2 additions & 9 deletions cmd/waku/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func main() {
ForceReachability,
ResourceScalingMemoryPercent,
ResourceScalingFDPercent,
IPColocationLimit,
LogLevel,
LogEncoding,
LogOutput,
Expand All @@ -56,10 +57,10 @@ func main() {
Topics,
ContentTopics,
PubSubTopics,
BridgeTopics,
ProtectedTopics,
RelayPeerExchange,
MinRelayPeersToPublish,
MaxRelayMsgSize,
StoreNodeFlag,
StoreFlag,
StoreMessageDBURL,
Expand All @@ -69,9 +70,6 @@ func main() {
FilterFlag,
FilterNode,
FilterTimeout,
FilterLegacyFlag,
FilterLegacyNode,
FilterLegacyLightClient,
LightPush,
LightPushNode,
Discv5Discovery,
Expand All @@ -89,11 +87,6 @@ func main() {
MetricsServer,
MetricsServerAddress,
MetricsServerPort,
RPCFlag,
RPCPort,
RPCAddress,
RPCRelayCacheCapacity,
RPCAdmin,
RESTFlag,
RESTAddress,
RESTPort,
Expand Down
Loading
Loading