RFC - Syrius - Message field in Transfer widget

Hello ZNNAliens!

I’ve managed to integrate an optional message (data) field in Syrius. Please review the attached images and let me know if you like/dislike the design changes.
Any feedback is appreciated! :slight_smile:

I’ve tested the field and haven’t experienced any crashes in various scenarios: empty field, all keyboard chars entered, 10k char payload, etc.

Code can be reviewed here: Added Message field in Transfer widget · sol-znn/syrius@af4b3db · GitHub

Send Medium widget

Send Large widget

Send confirmation message

6 Likes

Wadn’t it already possible to sign a transaction and include a message in the process?

Not in the way you’re thinking.
Currently, in Syrius, users can navigate to Settings > Security > Sign to sign an arbitrary message with their address, but that data isn’t submitted in a transaction.

Check out _sendPayment(), line 224 for what I’m working on.

I copied the logic used for line 79 of cli_handler.dart and integrated it in the transfer menu in Syrius. This way, users can submit data/messages on-chain with a (free!) transaction.

2 Likes

I see, that’s pretty neat! Is there any potential risk to ledger bloating because of this? Just hypothetically

1 Like

Good question! There may be that risk if some bad actors decide to spam the network.
znn_cli_dart already provides us with this capability and I don’t think anyone has been abusing that. I could be wrong.
I wonder if Professor Z and/or Mr Kaine already addressed this concern somewhere.

I’d welcome input from @georgezgeorgez @Dumeril @0x3639 @romeo re: the hypothetical question Shazz posed.

We could potentially limit the data payload further (current limit is ~10kb, I think) if we feel this would burden our Sentinels and Pillars with exorbitant storage costs in the future.

Doesn’t Plasma already act as an anti-spam mechanism? You would need to fuse a lot of QSR or do a lot of “computational work” to spam the network with messages on transactions.

So my guess is we have an antispam mechanism to prevent this. Not sure about chain bloat. Mr. Kaine seems to reference this a lot in TG.

But I do like the idea of adding a signed memo field.

The current limit is 16k. It would be interesting to run some simulations to visualize chain growth depending on tx # and sizes, but generally I guess @0x3639 is correct - plasma is at least meant to prevent chain bloat due to spam; the required amount grows linearly with the data size in an account block.

Btw., it wouldn’t be a storage problem for only sentinels/pillars currently, as every node stores the same data.

1 Like

No comments on the layout, etc… I think everything looks great.

2 Likes

I think it’s a great improvement, to be able to add a description and then the confirmation check … we want everything to be easy and intuitive for the sake of mass adoption

2 Likes