jotapea / counterparty-core

Counterparty Protocol Reference Implementation
http://counterparty.io
MIT License
0 stars 1 forks source link

Clean Up messages Table #1617 #1

Open jotapea opened 1 month ago

jotapea commented 1 month ago

Alternate discussion space to issue: https://github.com/CounterpartyXCP/counterparty-core/issues/1617.

jotapea commented 1 month ago

@ouziel-slama You can see what I meant with the "addition" of a messages-specific index in https://next.xcp.dev/block/846205. Toggle the 'show all events' checkbox.

ouziel-slama commented 1 month ago

@jotapea looks great!! the message_index (exposed as event_index in the API v2) should be sufficient! all events are equals, there are just no messages here.. the thing that most deserves the name "message" is the data field of the transaction table.. so in the case of events it would be the tx_hash of the event which would be the message_index..

As a regular user of your site can I suggest presenting the list of events in the following form:

EVENT_NAME: <human readable description>

look at the following list that you can reuse as is: https://github.com/CounterpartyXCP/counterparty-core/blob/master/counterparty-core/counterpartycore/lib/log.py#L83-L132

jotapea commented 1 month ago

Thank you @ouziel-slama , I've always wanted xcpdev to just be a friendlier frontend to the raw protocol data, and it makes me VERY happy to hear you (as the top code contributor) are a regular user.

If you want, you can take this opportunity to make a PR to xcpdev-spa with your suggestion? You can literally just keep the constant in a js file, and then I'll take it from there.

And I still see the messages a bit diferent from you, but that is fine as maybe you have future plans I cannot yet foresee. So, at least for now, I'll keep the separate message-index because it is cohesive to the whole messages-first design of xcp.dev.