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

Web support, better round robin engine #2

Merged
merged 15 commits into from
Feb 22, 2023

Conversation

TrueCarry
Copy link
Contributor

Local implementation of adnl changed to original. Now it has support for tcp:// and ws:// transports. Because of that new engine api changed, maybe time to make 2.0.0 release.

Random bytes imported from tweetnacl instead of crypto, since it's hard to include crypto for browsers and tweetnacl already used in most ton libs.

Round robin engine now uses incremental server select. Also it checks if connection is open to avoid timeouts that we aware of beforehand and retries on errors. It allows to not retry calls when using lib in client/server code.

@IRGC
Copy link

IRGC commented Jan 4, 2023

why this PR still not reviewed?

@IRGC
Copy link

IRGC commented Jan 4, 2023

@dvlkv @ex3ndr

Copy link
Collaborator

@dvlkv dvlkv left a comment

Choose a reason for hiding this comment

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

LGTM but has some issues

src/engines/roundRobin.ts Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@TrueCarry TrueCarry force-pushed the truecarry/adnl-client branch from b9d2103 to 7257732 Compare February 19, 2023 08:24
throw e
}

await delay(100)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably need to use timeout from arguments

@@ -161,6 +189,6 @@ export class LiteSingleEngine implements LiteEngine {
if (!this.#closed) {
this.connect();
}
}, 1000);
}, 10000);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe do this configurable?

@TrueCarry TrueCarry marked this pull request as ready for review February 21, 2023 08:44
@dvlkv dvlkv merged commit f4b3f83 into ton-core:master Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants