Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Graffiti in hex #8168

Closed
Dimasin opened this issue Dec 20, 2020 · 10 comments · Fixed by #8894
Closed

Add support for Graffiti in hex #8168

Dimasin opened this issue Dec 20, 2020 · 10 comments · Fixed by #8894
Labels
Enhancement New feature or request Good First Issue Good for newcomers Help Wanted Extra attention is needed

Comments

@Dimasin
Copy link

Dimasin commented Dec 20, 2020

I can uses graffiti string in hex format? E.g:
0xf09f90a057656c636f6d6520746f20746865204e657720426567696e6e696e67

@rkapka
Copy link
Contributor

rkapka commented Dec 21, 2020

Hi @Dimasin

Please ask the question on our Discord server: https://discord.gg/YMVYzv6

Thank you!

@rkapka rkapka closed this as completed Dec 21, 2020
@terencechain
Copy link
Member

I can uses graffiti string in hex format? E.g:
0xf09f90a057656c636f6d6520746f20746865204e657720426567696e6e696e67

In short, you can not input hex and expect it to convert to ascii (e.g. Welcome to the New Beginning). Is there a particular reason that you would like to do this?

@terencechain terencechain reopened this Dec 21, 2020
@terencechain terencechain added the Need-Info Need more information from author label Dec 21, 2020
@Dimasin
Copy link
Author

Dimasin commented Dec 21, 2020

Graffiti uses UTF-8 characters, such as 0xf09f90a0. Using the copy / paste method may not always guarantee an accurate result. A string in hex format will always be displayed the same way.

@no-response no-response bot removed the Need-Info Need more information from author label Dec 21, 2020
@terencechain
Copy link
Member

Graffiti uses UTF-8 characters, such as 0xf09f90a0. Using the copy / paste method may not always guarantee an accurate result. A string in hex format will always be displayed the same way.

It's a reasonable request. Can you update the description to something like "Add support for Graffiti in hex" ?

@Dimasin Dimasin changed the title Graffiti string in hex format Add support for Graffiti in hex Dec 22, 2020
@rkapka rkapka added the Enhancement New feature or request label Dec 25, 2020
@terencechain terencechain added Good First Issue Good for newcomers Help Wanted Extra attention is needed labels Dec 31, 2020
@d00medman
Copy link
Contributor

It isn't entirely clear to me what the request is here. Do you have examples of hex graffiti being displayed in different ways, or examples of hex strings which are not properly translated into graffiti?

@Dimasin
Copy link
Author

Dimasin commented May 12, 2021

It isn't entirely clear to me what the request is here. Do you have examples of hex graffiti being displayed in different ways, or examples of hex strings which are not properly translated into graffiti?

It isn't entirely clear to me what you want me to do. I've already made my case. This is, after all, just a suggestion.

@nisdas
Copy link
Member

nisdas commented May 13, 2021

@d00medman From what I understand, @Dimasin wants to provide hex data as grafitti rather than a UTF-8 string. So instead of providing the validator

--graffiti=🐠Welcome to the New Beginning

we can instead use

--graffiti=0xf09f90a057656c636f6d6520746f20746865204e657720426567696e6e696e67

Then the validator will internally convert the hex data to a utf-8 compatible string and add that to any future proposed blocks.

@prestonvanloon
Copy link
Member

We could support functionality like

if "0x" == graffiti[0:2] {
  graffiti = convertHex(graffiti[2:])
}

This would consider any string that starts with the 0x prefix, as is common in ethereum, to be a hex encoded data which should be treated as such.

@potuz
Copy link
Contributor

potuz commented May 13, 2021

Except it's quite common in this environment to have avatars of the form 0xpotuz and this will force them to encode the string. Perhaps something like hex:09ab12?

@prestonvanloon
Copy link
Member

@potuz That would be acceptable and solve the problem at hand, with minimal burden on the user. Thanks for that suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Good First Issue Good for newcomers Help Wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants