Add testrpc-sc publication docs, use published testrpc-sc

pull/81/head
cgewecke 7 years ago
parent 81a132b94b
commit 8398920f49
  1. 83
      docs/testrpc-sc.md
  2. 4
      package.json

@ -0,0 +1,83 @@
# How to upgrade testrpc-sc
Warning: this is a birds nest. Any ideas for improvement, however small, are welcome. Document may contain inaccuracies.
### testrpc-sc:
+ published on `npm` as `ethereumjs-testrpc-sc`
+ published **from the coverage branch** of [`sc-forks/testrpc-sc`](https://github.com/sc-forks/testrpc-sc/tree/coverage)
+ a webpack bundle of `sc-forks/ganache-core-sc#coverage` and all of its dependencies.
+ changing `sc-forks/ganache-core#coverage` or any of its dependencies cannot harm `testrpc-sc` (until publication)
+ publishing `testrpc-sc` cannot harm `solidity-coverage` until its deps are updated.
To publish a new version:
```
$ git checkout coverage
$ rm -rf node_modules
$ yarn install
$ npm run build // Check build, just to make sure
$ npm version patch // If helpful. If you're tracking the upstream with a ganache-core sync, use theirs.
$ git push
$ npm publish // This also runs build. Emphasizing the need to build here.
// Go to `solidity-coverage` and pin its `testrpc-sc` dependency to the new version.
```
### sc-forks/ganache-core-sc:
+ is what testrpc-sc used to be
+ set by default to [its `coverage` branch](https://github.com/sc-forks/ganache-core-sc)
+ depends on `sc-forks/ethereumjs-vm-sc.git`
+ depends on `sc-forks/provider-engine-sc.git#8.1.19` (Don't look too closely at this)
+ differs from `truffle-suite/ganache-core` by these deps AND
[two lines](https://github.com/sc-forks/ganache-core/blob/ae31080cdc581fef416a1c68cbe28ff71b6fb7c9/lib/blockchain_double.js#L36-L37)
in `blockchain_double.js` which set the block and transaction default gas limits.
To sync `ganache-core-sc` with its upstream parent at `truffle-suite`
```
$ git checkout master
$ git remote add upstream https://github.com/trufflesuite/ganache-core.git
$ git pull upstream master
$ git push
$ git checkout coverage
$ git rebase -i master (there will probably be conflicts)
$ git push
```
### How can I modify ethereumjs-vm-sc and test the changes at `solidity-coverage`?
It's a nightmare. You have to cut a channel of branches (say `#vm`) through the entire project:
`solidity-coverage#vm` with `package.json`
```
"ethereumjs-testrpc-sc": "https://github.com/sc-forks/testrpc-sc.git#vm"
```
`testrpc-sc#vm` **based on the coverage branch** with `package.json`
```
"ganache-core": "https://github.com/sc-forks/ganache-core.git#vm"
```
`ganache-core#vm` with `package.json`
```
"ethereumjs-vm": "https://github.com/sc-forks/ethereumjs-vm-sc.git#vm"
```
`ethereumjs-vm-sc#vm` (This is where you will work).
+ To test your changes:
+ freshly install `node_modules` in testrpc-sc#vm and execute `npm run build`
+ freshly install `node_modules` in `solidity-coverage#vm`
+ To merge / publish the changes:
+ Merge `ethereumjs-vm-sc#vm` to master.
+ follow the `testrpc-sc` publication steps above.

@ -23,7 +23,7 @@
"dependencies": { "dependencies": {
"commander": "^2.9.0", "commander": "^2.9.0",
"death": "^1.1.0", "death": "^1.1.0",
"ethereumjs-testrpc-sc": "git+https://github.com/sc-forks/testrpc-sc.git#coverage", "ethereumjs-testrpc-sc": "4.0.1",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"keccakjs": "^0.2.1", "keccakjs": "^0.2.1",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
@ -42,7 +42,7 @@
"ethereumjs-account": "~2.0.4", "ethereumjs-account": "~2.0.4",
"ethereumjs-tx": "^1.2.2", "ethereumjs-tx": "^1.2.2",
"ethereumjs-util": "^5.0.1", "ethereumjs-util": "^5.0.1",
"ethereumjs-vm": "https://github.com/sc-forks/ethereumjs-vm-sc.git#3.0.3", "ethereumjs-vm": "https://github.com/sc-forks/ethereumjs-vm-sc.git",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"merkle-patricia-tree": "~2.1.2", "merkle-patricia-tree": "~2.1.2",
"mocha": "^3.1.0", "mocha": "^3.1.0",

Loading…
Cancel
Save