Cosmos SDK or CosmWasm for a Rustean?
Hi Guys! I just ran into this awesome project. I have a general question. I'm an apprentice Rustacean, Coswasm seems like the preferred choice to get my feet wet due to the language preference. Having said this, I would be interested in learning about the limitations or constraints of using Coswasm as opposed to sticking with the CosmoSDK? Sure, I understand that WASM in general would be best suited for MVPs. What if we limit the question to just smart contracts? Is there anything I can't accomplish in Coswasm that I would be able to implement using the Go CosmoSDK?
- 3 replies
- Orkun Külçe @orkunkl2020-07-27 09:27:28.759Z
CosmWasm is for smart contracts that live on your blockchain, Cosmos SDK is for designing your blockchain (eg. native coins, staking and slashing). Theoretically I think you could get CosmWasm to do anything native modules could, but from a pragmatic point of view, there are some things (such as OS/FS, network, or interfacing with other Go modules) that would make more sense on Layer 1
- In reply toorkunkl⬆:Orkun Külçe @orkunkl2020-07-27 09:28:03.980Z
It is not just for mvp, but also dynamic functionality. If you know the cosmos sdk, the main limitations are no access to BeginBlocker or EndBlocker.
Currently, you can only call into the native bank and staking modules, but you can add support for more on your chain without forking the code.
Currently, you have no way to update the validator set except by calling into the staking module, so you cannot write an alternate poa/pos system (though I would like to expose that mid-term)
And you cannot modify the ante handler, so if you want to add support for another signature algorithm, or different fee mechanism, you cannot with cosmwasm contracts
That said, most modules people write do none of the above, and if you don't need it, I would recommend cosmwasm. Especially if you have not launched your own mainnet... as you will have a much easier time deploying your contract to someone else's blockchain than running your own (and can move to your own chain later on when your project matures, not as a first barrier to entry)
- In reply toorkunkl⬆:Orkun Külçe @orkunkl2020-07-27 09:28:18.896Z
I would say developing a module with cosmos sdk is time consuming job due to redundancy. Development speed with CosmWasm would be higher. Also actor model design of CW would make software architecture more intuitive and maintainable IMO.