JoinColony / colonyNetwork

Colony Network smart contracts
https://colony.io/
GNU General Public License v3.0
437 stars 106 forks source link

Investigate Optimistic Rollup #850

Open area opened 4 years ago

area commented 4 years ago

I've created an ovm branch where I've been trying to apply the OVM truffle guide.

To try and run our tests with the OVM, use the command yarn truffle test ./test/contracts-network/colony.js --config truffle-config-ovm.js

Changes so far:

This at least got the contracts compiling. But tests fall as soon as they try to call a function, which happens in the fourth migration. This is as far as I've gotten so far :smile:

area commented 4 years ago

After updating the contracts on this branch and updating the transpiler, I now cannot even get the contracts to compile. Make sure you're using Node 10 (Node 12 can't install all dependencies), and use yarn --ignore-engines to install everything. Then try and compile with the command:

NODE_OPTIONS="--max-old-space-size=4096" yarn truffle compile --config ./truffle-config-ovm.js

we get an error in ColonyNetwork:

[Could not find CODECOPYed constant in transpiled deployed bytecode for PC 0x3c63.  We originally recorded the constant as 0x4035866040518263ffffffff1660e01b815260040162002a63919062003f02565b60, but it does not exist in the post-transpiled

which is then followed with the transpiled bytecode. There are a lot more errors after that, but my best guess is that this is a case of some of the tagging going wrong? The subsequent errors talk about opcodes that don't exist, so I guess they shouldn't be being processed as opcodes, but as constants? I really don't know though...

area commented 3 years ago

Another alternative to look at might be https://offchainlabs.com/