Closed aquiladev closed 5 years ago
@zelig, @nolash, can you take a look at this?
@aquiladev writing to let you know that I've noticed the submission, but haven't so far had the bandwith to go through it. I hope to get back to you with a review early next week. In the meantime, thank you very much for your contribution.
@aquiladev I've had a look through the submission now, and I have a couple of questions:
Thanks.
@nolash
@aquiladev ok I understand, thanks.
I gave it a spin with @justelad and we were able to add each other and exchange messages. So far so good. Some questions regarding the pss implementation:
I'm not qualified to do a proper review of a react app, so @justelad will be taking care of that in the near future.
THanks.
Hi @nolash,
No, it can't because it has no way of knowing. Either the address must be explicitly given by the user, or it would have to be part of the request/response handshake where the peer voluntarily discloses its address. You can specify anything from 0 to 32 bytes of address. The more bytes you specify, the more efficient the routing will be. Right now it's in effect 0 bytes, which means it sends all messages to all peers (along the lines of the basic strategy of whisper). The main point of pss, however, is to provide message routing; a tradeoff of secrecy for efficiency. So could we do either one of the two?
I see. So, if the work is to be continued into "goal 2," I'd prefer if we include in the next step address connection restoration within a session, agree?
Great
Yes, either popup or just a div over the pubkey fields with defaults already filled in that disappears when you click connect. You choose.
Thanks again.
pss_baseAddr
and public key by pss_getPublicKey
2) send contact request:
pss_setPeerPublicKey {receiverPublicKey} {topic}
pss_sendAsym {receiverPublicKey} {topic} {message}
, message contains base address of sender
3) accept request by contact:pss_setPeerPublicKey {senderPublicKey} {topic}
pss_sendAsym {senderPublicKey} {topic} {message}
, message contains base address of receiver
4) exchange messages pss_sendAsym {publicKey} {topic} {message}
Would you please point me to the place regarding the address?
send message pss_sendAsym {senderPublicKey} {topic} {message}, message contains base address of receiver
@aquiladev aha so it is handled in the contact request/response then? The full address of the requester is set with setPeerPublicKey
on the receiver, and the requester updates from the address in the response? If it's done like this it's all fine.
... I mean - ideally sliding scale "luminosity," of course, but that's for later :)
HOWEVER - I see in your calls to setPeerPublicKey
in /examples/messenger/src/base/messenger.js
the address argument is omitted. That translates to an zero-byte address. Even if your application message struct contains the address, there is no software that automagically sets this for you.
Oh and I forgot one more thing:
Could you please remove the leading /
in the resource paths? Or are they necessary? Without them the app can be served from a subfolder.
@nolash there is no routing, /
is not needed and not used
If I put the app on my webserver at localhost/messenger
lets say, I get a bunch of 404s when trying to load.
@aquiladev the address stuff seems to work. Good! Curious: If I first send 0x as the address, it gets updated on the response, right?
The websocket popup, if I give an alternate value (port 8547 for example) and press enter, the popup just pops back, if I press the button, it works.
@nolash
npm run build
), then copy artifact to target locationenter
Great! That's all from me. Thanks :)
@justelad I agree that the solution design may look not good, can be heavily improved, but this is example dapp, I think it is not needed here
24 #25