EOSIO/eosio-project-boilerplate-simple

Install System Contracts or include note on installed Contracts in README

c0d3ster opened this issue · 5 comments

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.

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

@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.

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.

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

  • In the Contracts repo there's no mention of how to deploy the contracts, only how to build them.
  • And running that build script in this docker container doesn't work because it's missing cmake and some other utils that I installed with build-essential, but that's probably massive overkill. So it'd be great to document there what tools are actually required on your machine for a successful build.
  • Even once I install build-essential the build script still exits with an error, but most (maybe all, didn't check) of the contracts are compiled. So not sure exactly how to get that to work.

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.

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

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