Action enum for channels #3

Open
opened 2025-01-12 16:11:16 +01:00 by str3tch · 0 comments
Owner

Qucik side note, this application started as an interface for basic node stats such as genesis block, version, number of peers and etc. 😅

That's why legacy behaviour is to have one enum of actions to everything, while more requests and actions are introduced during expansion of the application. For example for now we have different channels for so-called application actions and network actions but all of them are using same enum (which is sometimes really pain in the ass). We need to separate and remove unnecessary actions based on the channel.

Fun fact, enum Action is used in order to parse configuration file, it has pretty strict derives, that's why we are limited for now to pass as action some custom data struct, for example ExtrinsicDetails clearly could not be send over the channel. That's why for now on the explorer you see extrinsic hash but not the actual fields 🤗

_Qucik side note_, this application started as an interface for basic node stats such as genesis block, version, number of peers and etc. 😅 That's why legacy behaviour is to have one enum of actions to everything, while more requests and actions are introduced during expansion of the application. For example for now we have different channels for so-called **application actions** and **network actions** but all of them are using same enum (which is sometimes really pain in the ass). We need to separate and remove unnecessary actions based on the channel. Fun fact, `enum Action` is used in order to parse configuration file, it has [pretty strict derives]([url](https://git.ghostchain.io/ghostchain/ghost-eye/src/commit/85e44f0bb82be1a3eed8552caf7a5bef0d7bae4e/src/action.rs#L11)), that's why we are limited for now to pass as action some custom data struct, for example `ExtrinsicDetails` clearly could not be send over the channel. That's why for now on the explorer you see extrinsic hash but not the actual fields 🤗
str3tch added the
enhancement
help wanted
labels 2025-01-13 14:42:19 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ghostchain/ghost-eye#3
No description provided.