Smart contracts, nft, blockchain market places: Rust vs Go

  1. Genuine question. No flame war intended.

  2. Technical discussion only please. Please post social / economic discussions elsewhere.

When it comes to Non-Fungible-Tokens, market places for NFTs, smart contracts on blockchain, does Go-lang tend to have better library support than Rust ?

For example, for many high profile NFT / market place / smart contract commercial projects, I see "minimal feature" open source clones in Go-lang, but not in Rust.

To my (admittedly limited) knowledge both are widely used to implement blockchains.

I would be interested in hearing more about Rust. All I see are the wasm32 single pass runtimes claiming that this is great for blockchain, when we care about compile time + runtime -- but I have not seen any popular blockchain / nft / marketplaces use Rust.

I was really interested in Rust for blockchain; however, Solana is currently broken and will probably never function because of spam trade bots flooding the network and causing out of memory panics and dropping all their validator nodes. Even worse, they implemented a form of sharding to split the data storage up to keep costs lower, so as nodes were panicked out of commission, the remaining ones began to fork, so there are now an untold number of chains in existence as of now. Any attempt to bring them back up will be met with a continued attack and they will be brought back down. I would have really liked to see Rust perform well here, spent quite a bit of time studying the language to leverage Solana dApps. But I think polkadot will be next, and if I were a hacker, I would probably start targeting rust built chains and validators to exploit this critical vulnerability with the utmost savagery like we are currently witnessing. There is currently $45 billion locked in and funds stored in non-exchange wallets will likely not be able to make it to exchanges. I would consider this carefully before implementing Rust in the handling of process instruction. Cryptographic hashing libraries are probably where it belongs.

I hope Forum admins will allow this "crypto" conversation as there are really fascinating Rust-related technical questions here.

Same here. With solidity, I had 0 faith in my ability to non-trivial code that could survive decades un-patched (smart contracts). With Rust -> wasm32, I have epsilon faith.

Is this something that recently happened ? CoinMarketCap currently lists them at 46B, which sounds insane given the claims above.

What exactly is this "critical vulnerability" of "rust built chains" you are referring to? Out of all the (language, VM, crypto) combos out there that I am aware of, it seems to me that Rust/wasm32 is likely to have the best performance. What is this "critical vulnerability" of "rust built chains" you are referring to?

"Infalliable" allocation probably.

1 Like

Im playing the guessing game. In the discord they said "out of memory" and only had 400k transactions per second to go off of. I am assuming it was caused by an outrageous load (probably from Eth holders, or maybe even exchanges or banks) consuming all the memory. I am genuinely hoping this isn't the case as I've put a decent amount of effort and time into learning Rust and Solana (not the most clear process, tbh, but I love the challenge).

Out of memory was the specific error mentioned in the discord. It probably hasn't dropped as much because nobody can get their funds back onto an exchange yet from self hosted wallets. Scary to think about how pissed a lot of people must be right now :smiley:

Im really hoping their most recent "queue management" explanation is indeed true.

Its slowly starting to come back online, but Im worried the spam bots will start back up at any time. Hopefully it is the queue management, but the comments Ive heard from Torvalds don't exactly inspire confidence lol. No exchange has enabled deposit or withdrawal yet.

@aaely : Unrelated to the recent posts, but going back to the original question. In your opinion, since you seem very embedded in the Rust / crypto world:

How do the Rust-libraries compared to Go-libraries when it comes to cryptos / NFTs / marketplaces ?

Go is largely used in nodes/validators. Ethereum is a good example of a go node implementation, but I don't know of any for NFTs/Marketplaces (Im assuming you mean on the contract/program side of these) implementations in Go. Would be interesting to see go in smart contracts/programs.

Solana and Polkadot are the main chains I know comprised entirely of Rust. Heres a look at Dot and their node implementation in Rust:

1 Like

Solana uses Rust for their programs-- smart contract equivalent. It seems like I have to sort of manually build in the ABI that Eth and EVM L2s compile and provide for you when using Solana. So its a lot more leg work and troubleshooting, but I like a challenge. The data has to be converted into a buffer starting on the front end, received in the 'program' and repacked even tighter with serialization/deserialization of the data being stored. It gets confusing because the programID used to call the program is called an account, and a bunch of different accounts get spawned that actually store the data, so the term account gets thrown around all over the place and can make things confusing for a bit. In short, I find building in Rust and Solana more rewarding because there is some serious low level and high level code one has to consider in use. I find the process infinitely easier when dealing with Ether/L2s, but also less rewarding.

Here is the Token scaffolding provided by Solana containing ALL the logic that could possibly be used by a token, fungible or non: solana-program-library/token/program/src at master · solana-labs/solana-program-library · GitHub

The equivalent of scaffolding in Solidity is this: openzeppelin-contracts/contracts/token at master · OpenZeppelin/openzeppelin-contracts · GitHub

1 Like

@aaely : What are your thoughts on substrate / polkadot / parity technologies ? I know that you have been discussing Solana quite a bit, but I am curious what you make of substrate / polkadot. (From quick youtube videos by Gavin Wood, it looks like the goal is to make it easier to create new blockchains? Not very sure, familiar with Rust, but not all the crypto jargon.)

Interesting you ask this now after reading in depth and getting a taste of the fire and almost hostility I honestly love about the Rust community on your answer to my question in another thread :joy:

After reading up on the thread you supplied in the other topic, I revisited substrate. I think using substrate as hyperledger and implementing auto scheduled zkrollups on a daily/weekly/etc basis is what I am currently investigating.

1 Like

You might be crediting me with something I did not contribute, as I do not think I looked at Parity/Polkadot/Substrate until you mentioned it.

Also, do you know where the tech people (not the marketing / influencers) for Parity / Polkadot / Substrate hang out? I think they are building some very cool tech.

Substrate is by far their most interesting project, IMO.

Just scroll down to the technical parent section and join the fun!

Hey, you might find Cosmos interesting too. Don't know how I overlooked this one. Similar to Dot, only written in Go.

Came across this nice blog yesterday, see if it is of any use to you.

https://brson.github.io/2020/12/03/substrate-and-ink-part-1

1 Like

I encourage everyone here to have a look at the NEAR protocol.

This topic was automatically closed 7 days after the last reply. We invite you to open a new topic if you have further questions or comments.