EOSIO / eosio-project-boilerplate-simple

This repository demonstrates the eosio platform running a blockchain as a local single node test net with a simple DApp, NoteChain.
139 stars 64 forks source link

Install System Contracts or include note on installed Contracts in README #32

Open c0d3ster opened 5 years ago

c0d3ster commented 5 years ago

If anyone is attempting to use this boilerplate with any other examples we have, it may be confusing that this chain is deploying custom contracts. For example, there was confusion caused by the lack of buyrambytes contracts in this EOSJS issue. We should consider adding a note that these contracts are different than the system contracts or install the system contracts as well, so this can immediately be used as a baseline for other examples that utilize system contracts.

tbfleming commented 5 years ago

Installing the system contract is a major effort which isn't needed in most test chains. See https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence

thekevinbrown commented 5 years ago

@tbfleming from my perspective it'd be best to get notified of problems as soon as possible in the development cycle. If we're doing anything that wouldn't be allowed by the system contracts on main net, it'd be best if that error happened during development, not after deployment to Jungle or the live network.

An example being that we get unlimited RAM in the current setup. This does not mirror how "real world" EOS works, so I'm thinking it'd be best if the system contracts were built and installed in the same way as they are on mainnet so we can run our code in as close to the same environment as is possible.

tbfleming commented 5 years ago

Developers that need to test using the system contract can follow the bios boot sequence or use the script the tutorial points to. It's complicated and requires many nodes because the system contract forms 1 integrated approach, complete with staking, voting, and producer scheduling.

thekevinbrown commented 5 years ago

@tbfleming that sounds great. A few things that'd make this a bit easier:

A very common scenario that I realised most dApps are going to need is creation of new users. Right now my code creates the account, then checks for the existence of system contracts and actions and only does buyrambytes and delegatebw if they exist, but that's less than ideal in my opinion. It'd be better if we could run the same code on all environments and fully test the system.

I'll have a go at implementing the building of the system contracts and deploying them without going for a full multi-block-producer setup.

thekevinbrown commented 5 years ago

I've logged an issue on the build problems with that other repo: https://github.com/EOSIO/eosio.contracts/issues/225

I think it'd be good to mention this in the readme of this repo.