solang icon indicating copy to clipboard operation
solang copied to clipboard

Be clear on solana support

Open deepaktrama opened this issue 3 years ago • 3 comments

Thanks for adding solana support and keeping it open source. It will help accelerate solana dev. However it's not clear if this is ready for production on solana or is it really very alpha/work in progress.

https://solang.readthedocs.io/en/latest/targets.html just mentions a few differences (excerpt below), reading this I assumed it was ready for prime time use. Request you to please correct me if I am wrong and update the docs accordingly.

Target Specific Solana The Solana target requires Solana v1.8.1.

Solana has the following differences to Ethereum Solidity:

The address type is 32 bytes, not 20 bytes. This is what Solana calls an “account” An address literal has to be specified using the address"36VtvSbE6jVGGQytYWSaDPG7uZphaxEjpJHUUpuUbq4D" syntax There is no ecrecover() builtin function, but there is a signatureVerify() function which can check ed25519 signatures. Solana has no concept of gas, so there is no gas functions Solana balance is stored in a uint64, so msg.value, address .balance, .transfer() and .send() all use uint64 rather than uint256.

deepaktrama avatar May 01 '22 19:05 deepaktrama

@deepaktrama Solana support is very new, and has not been widely tested (as it is new). There are two developers working on Solang full-time, both are employed by Solana Labs, and Solana support is our priority.

Solana support should be working. solang does lack spl-token support and cannot to call non-solidity contracts, we are working on this.

There are some issues that need addressing, we will answer them as soon as possible.

seanyoung avatar May 01 '22 20:05 seanyoung

I think we should add some words to the documentation around:

  • what works today
  • what it being worked on
  • what sort of support can you expect

@deepaktrama would that be what you had in mind?

seanyoung avatar May 03 '22 10:05 seanyoung

@seanyoung yes, those are good points and I also suggest to add below points with reference to SOLANA which will help increase confidence and help adoption.

  • Known issues / things which are not working currently (i.e. which solidity syntax/features/functions/apis do not currently work)
  • How developers may have to write code differently for solana than what's already written for ethereum
  • A reference/link to a complete and complex program which works on solana
  • List of companies/projects currently using this in production
  • Comments from the developers if you recommend using this in production systems as it stands currently or can complex programs be written with this atm or is this right now just to give an idea to the community of what's coming up and it's not complete (i.e. certain solidity syntax and features will not work at all) and maybe it should only be used for trivial programs or research only. All these questions can be answered by your team since they are developing this and know best.

deepaktrama avatar May 03 '22 11:05 deepaktrama

@LucasSte #1225 fixed this?

xermicus avatar Jun 27 '23 09:06 xermicus