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

feat!: use ShardingParams on subscriptions, make Decoder/Encoder auto sharding friendly by default #1958

Merged
merged 45 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6acf183
fix: use pubsubTopic from current ones if not set
weboko Apr 15, 2024
a7bf4fd
fix: improve type on dial method
weboko Apr 15, 2024
08397ff
enforce same pubusb on filter.subscribe, make content topic to pubsub…
weboko Apr 18, 2024
c89c8f9
fix mapping problem
weboko Apr 18, 2024
5248761
update tests
weboko Apr 18, 2024
f9b9bda
add error handling
weboko Apr 18, 2024
fd60cc2
fix typo
weboko Apr 18, 2024
f7849c3
merge with master
weboko Apr 22, 2024
22cfb50
up lock
weboko Apr 22, 2024
8db5bf8
rm lock
weboko Apr 22, 2024
0f79e17
up lock
weboko Apr 22, 2024
0c7f4a1
remove only
weboko Apr 22, 2024
a8922ba
fix content topic
weboko Apr 22, 2024
eabe940
Merge branch 'master' of github.com:waku-org/js-waku into weboko/prot…
weboko Apr 24, 2024
68f3619
fix ephemeral test
weboko Apr 24, 2024
364045b
fix filter unsubscribe test
weboko Apr 24, 2024
b324f64
up utils
weboko Apr 24, 2024
f9d5546
fix subscribe test
weboko Apr 24, 2024
a629aa7
up interfaces and filter api
weboko Apr 24, 2024
d1aff71
remove only
weboko Apr 24, 2024
801b286
up ping test
weboko Apr 24, 2024
c10e7d9
fix subscribe test
weboko Apr 25, 2024
5ee014d
fix push test
weboko Apr 25, 2024
32852ad
fix lightPush
weboko Apr 25, 2024
f971624
fix multiple pubsub
weboko Apr 25, 2024
a929da7
remove only, fix subscribe filter test
weboko Apr 25, 2024
6e29167
remove only
weboko Apr 25, 2024
1641074
merge with master
weboko Apr 25, 2024
7d79bda
fix cluster ID selection and named sharding subscription test
weboko Apr 25, 2024
c574863
fix unsubscribe test
weboko Apr 25, 2024
8873aa1
fix light push test
weboko Apr 25, 2024
7d24612
fix light push test
weboko Apr 25, 2024
d8b1952
fix push test
weboko Apr 25, 2024
600c02b
fix relay publish
weboko Apr 25, 2024
88ba615
create runNode and fix relay tests
weboko Apr 25, 2024
90731d7
generalize runNodes, fix some tests
weboko Apr 26, 2024
a4c3d50
fix store tests
weboko Apr 26, 2024
16ffc67
fix toAsyncIterator tests
weboko Apr 26, 2024
e47cc67
remove only
weboko Apr 26, 2024
7e1260b
fix lightPush
weboko Apr 26, 2024
9d02f2b
use generics
weboko Apr 26, 2024
b0381b4
try fix test
weboko Apr 26, 2024
53d4db8
run failing tests
weboko Apr 26, 2024
fd9cb86
remove only
weboko Apr 26, 2024
f7595c2
address failed tests, remove DefaultPubsubTopic dependency in some tests
weboko Apr 27, 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
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/core/src/lib/filter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ class Filter extends BaseProtocol implements IReceiver {
decoders: IDecoder<T> | IDecoder<T>[],
callback: Callback<T>
): Promise<Unsubscribe> {
const subscription = await this.createSubscription();
const subscription = await this.createSubscription(
this.pubsubTopics?.[0] || DefaultPubsubTopic
weboko marked this conversation as resolved.
Show resolved Hide resolved
);

await subscription.subscribe(decoders, callback);

Expand Down
4 changes: 2 additions & 2 deletions packages/interfaces/src/waku.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PeerId, Stream } from "@libp2p/interface";
import type { Multiaddr } from "@multiformats/multiaddr";
import type { MultiaddrInput } from "@multiformats/multiaddr";

import { IConnectionManager } from "./connection_manager.js";
import type { IFilter } from "./filter.js";
Expand All @@ -18,7 +18,7 @@ export interface Waku {

connectionManager: IConnectionManager;

dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
dial(peer: PeerId | MultiaddrInput, protocols?: Protocols[]): Promise<Stream>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix for discrepancy in types - this prevents us from doing .dial(multiAddrStr) in TS


start(): Promise<void>;

Expand Down
Loading