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

[Feature Request] Interop or VM functionality #263

Closed
localhuman opened this issue Jun 1, 2018 · 7 comments
Closed

[Feature Request] Interop or VM functionality #263

localhuman opened this issue Jun 1, 2018 · 7 comments
Labels
enhancement Type - Changes that may affect performance, usability or add new features to existing modules.

Comments

@localhuman
Copy link
Contributor

Add the following methods ( or similar) to the interop layer or VM:

  • Hex
  • Unhex
  • ScriptHashToAddress
  • AddressToScriptHash
@localhuman localhuman added the enhancement Type - Changes that may affect performance, usability or add new features to existing modules. label Jun 1, 2018
@shargon
Copy link
Member

shargon commented Jun 1, 2018

I prefer Interop

@erikzhang
Copy link
Member

Can this be built in compilers?

@localhuman
Copy link
Contributor Author

It can be in the compilers to convert /unconvert at compile time. But for ByteArray that are on the stack it would need to be in the Interop layer.

@igormcoelho
Copy link
Contributor

igormcoelho commented Jun 2, 2018

In the spirit of the conversation, I'd like to ask for another related method hahaha is there some sort of validateAddress in lower layers?
That would be nice to ensure the address is valid... the way it is now, we have byte[] for everything, we can validate things like length, but I don't think it can be validated to be an address. If it was passed as Base58 Address it could be validated, but as you said before, we currently cannot do that in lower layers (too expensive to convert it to scripthash). So, if we manage to provide some Address support in lower layers, it would also be nice to have a validateAddress (and we can perhaps start to use a specific type for it in Neo) :)

@dicarlo2
Copy link

dicarlo2 commented Jun 7, 2018

What’s the use case for using base58 addresses vs just always using script hashes in smart contracts?

@igormcoelho
Copy link
Contributor

igormcoelho commented Jun 7, 2018

@dicarlo2 you made me think about it and I suddently dont want this feature anymore... O.o let me explain why. base58 address and scripthash are almost the same, but the first comes with integrity check. If that existed months ago , I believe some problems in some smart contracts wouldnt have existed (I cannot go into details), because of this integrity check and perhaps stronger type checking for address type (not just bytearray) being allowed in.upper level languages. But now these problems seem to be solved in another way, and Im starting to question if this current base58 address format is the best for users (I dont think so). So, if other address standards exist in the future , we would need more interop.... so perhaps its better to keep only scripthash in lower levels, like you just said :) but I dont know for sure, must think more, carefully...

@erikzhang
Copy link
Member

Base58 addresses for UI, scripthash for lower levels.

Thacryba pushed a commit to simplitech/neo that referenced this issue Feb 17, 2020
* Minor fixes on NEO-CLI for Spanish translation

* Improve whitepaper and other docs on Spanish translate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Changes that may affect performance, usability or add new features to existing modules.
Projects
None yet
Development

No branches or pull requests

5 participants