-
Notifications
You must be signed in to change notification settings - Fork 465
WIP: Update devnet to post-constantinople version #1775
Conversation
@@ -42,7 +42,7 @@ async function _getInsufficientFundsErrorMessageAsync(): Promise<string> { | |||
} | |||
|
|||
async function _getTransactionFailedErrorMessageAsync(): Promise<string> { | |||
return _getGanacheOrGethErrorAsync('revert', 'always failing transaction'); | |||
return _getGanacheOrGethErrorAsync('revert', 'Transaction failed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of Geth changed this error message, so I had to update our assertions.
@@ -40,7 +40,7 @@ export const txDefaults = testProvider === ProviderType.Ganache ? ganacheTxDefau | |||
const gethConfigs = { | |||
shouldUseInProcessGanache: false, | |||
rpcUrl: 'http://localhost:8501', | |||
shouldUseFakeGasEstimate: false, | |||
shouldUseFakeGasEstimate: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the gas estimator in the latest version of Geth cannot estimate gas correctly when deploying our smart contracts. We've had some issues in the past but on the latest version it basically never works correctly. As a workaround we decided to disable it and just use the fake gas estimator.
@@ -2,13 +2,6 @@ import { logUtils } from '@0x/utils'; | |||
import { NodeType, Web3Wrapper } from '@0x/web3-wrapper'; | |||
import * as _ from 'lodash'; | |||
|
|||
// HACK(albrow): 🐉 We have to do this so that debug.setHead works correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally figured out why we needed this hack in the first place. The genesis.json file allows you to configure the block number for certain hard forks (e.g. the DAO hard fork or the Byzantium update). We had some of these configured to block number 1, 2, 3, and 4. I updated the genesis.json file to set all these block numbers to 0 so we no longer need to mine dummy blocks at the start of every test run.
437e3b5
to
7f78756
Compare
Exchange core tests are failing in CI:
I can't reproduce this locally. Might take some time to figure out. |
@@ -5,6 +5,7 @@ mkdir -p /var/log | |||
|
|||
# Start Geth and direct output to stdout | |||
/geth \ | |||
--allow-insecure-unlock \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to a new security feature added in the latest version of Geth, you can't unlock accounts and enable the RPC API without this flag.
Just to update you on the current state of our Geth fork, our devnet is now using the
|
See #1831 (comment). We're not going to try to maintain our own set of extra features on Geth moving forward. |
Description
This PR updates devnet to use our updated fork of Geth, which has support for post-Constantinople features.
Still WIP only because I haven't published the latest Docker image and re-enabled Geth tests in CI yet.
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.