Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

akim-bow
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Sep 28, 2023

DXJ-466 Add support for signatures in js-client

Need to implement

  1. Signature verification. Drop particle with missing or invalid signature.
  2. Identify particles by their signature, not their id

log.trace('particle signature doesn\'t match with the message. rejecting particle with id: %s', particle.id);
}
} catch (e) {
log.error('error on handling a new incoming message: %j', e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.error('error on handling a new incoming message: %j', e);
log.error('error on handling an incoming particle: %j', e);

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be very-very nice to print particle.id here. I guess that would require to try-catch Particle.from separately, but it surely worth it.

Being able to associate errors with particle.id is crucial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap, did it. Pls check again.

Akim Mamedov and others added 2 commits September 29, 2023 18:50
Copy link
Member

@justprosh justprosh left a comment

Choose a reason for hiding this comment

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

Maybe you disable signature verification for now and we first merge signature generation by js, then signature verification by nox, and finally merge signature verification by js-client

Copy link
Contributor

@shamsartem shamsartem left a comment

Choose a reason for hiding this comment

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

From TS side everything looks good. Thanks!

@folex folex changed the title feat(js-client): Particle signatures [fixes DXJ-466] feat(js-client)!: Particle signatures [fixes DXJ-466] Sep 29, 2023
* Particle's signature
*/
signature?: string;
signature: Uint8Array;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be back to string in base64, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, why?

@fluencebot fluencebot mentioned this pull request Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

e2e Run e2e workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants