symbol/catapult-rest

Revisit aliases as topic in web sockets / listeners

Opened this issue · 1 comments

Atm, Rest only accepts resolved addresses when subscribing to topics like confirmedAdded/<address>, unconfirmedAdded/<address>, etc.

https://github.com/nemtech/catapult-rest/blob/main/rest/src/connection/MessageChannelBuilder.js#L39

Form the whitepaper it seems like server can also accept aliases:

The Symbol message queue exposed to clients supports multiple channels. Each channel
has a unique topic. A topic always starts with a topic marker that indicates the kind of
messages that will be received. In some cases, the marker is followed by an unresolved
address that is used for additional filtering. Since a client is usually not interested in every
type of blockchain state change, it can subscribe to a subset of available topics

This issue is to validate if rest can also accept and send aliases when subscribing to the zero queue. The SDKs are doing the alias resolution before sending the address, maybe this is not necessary as the server resolves it.

rg911 commented

if the rest handles unresolved addresses, there will be fewer calls made from the clients 👍 We should do it this way