Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Hardfork #1107

Merged
merged 3 commits into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
494 changes: 266 additions & 228 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"filesize": "^3.6.1",
"find-process": "^1.1.0",
"fs-extra": "^7.0.1",
"ganache-core": "2.3.3",
"ganache-core": "2.4.0",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
"lodash.merge": "^4.6.1",
Expand Down
2 changes: 2 additions & 0 deletions src/Components/AppShell/TopNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class TopNavbar extends Component {
const blockNumber = this.props.core.latestBlock
const gasPrice = this.props.core.gasPrice
const gasLimit = this.props.core.gasLimit
const hardfork = this.props.config.settings.server.hardfork
const snapshots = this.props.core.snapshots
const isMining = this.props.core.isMining
const isLogsPage = this.props.location.pathname === '/logs'
Expand Down Expand Up @@ -170,6 +171,7 @@ class TopNavbar extends Component {
title="GAS LIMIT"
value={gasLimit}
/>
<StatusIndicator title="HARDFORK" value={hardfork} />
<StatusIndicator
title="NETWORK ID"
value={this.props.config.settings.server.network_id}
Expand Down
25 changes: 25 additions & 0 deletions src/Components/Config/ConfigScreens/ChainScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { Component } from 'react'
import connect from '../../Helpers/connect'
import OnlyIf from '../../../Elements/OnlyIf'

import StyledSelect from '../../../Elements/StyledSelect';

const VALIDATIONS = {
"server.gasPrice": {
allowedChars: /^\d*$/,
Expand All @@ -14,6 +16,10 @@ const VALIDATIONS = {
min: 1,
max: Number.MAX_SAFE_INTEGER,
canBeBlank: true
},
"server.hardfork": {
allowedChars: /^(byzantium|constantinople)$/,
canBeBlank: false
}
}

Expand Down Expand Up @@ -113,6 +119,25 @@ class ChainScreen extends Component {
</div>
</div>
</section>
<h2>HARDFORK</h2>
<section>
<h4>HARDFORK</h4>
<div className="Row">
<div className="RowItem">
<StyledSelect
name="server.hardfork"
defaultValue={this.props.config.settings.server.hardfork}
changeFunction={this.validateChange}
>
<option key="constantinople" value="constantinople">Constantinople</option>
<option key="constantinople" value="byzantium">Byzantium</option>
</StyledSelect>
</div>
<div className="RowItem">
<p>The hardfork to use. Default is Constantinople.</p>
</div>
</div>
</section>
{/* <h2>CHAIN FORKING</h2>
<section>
<div className="Row">
Expand Down
1 change: 1 addition & 0 deletions src/Reducers/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const initialState = {
lastRequestedBlock: -1, // Last block whose data was requested
gasPrice: "0",
gasLimit: "0",
hardfork: "constantinople",
snapshots: [],
systemError: null,
showBugModal: false,
Expand Down
4 changes: 3 additions & 1 deletion src/Services/GoogleAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class GoogleAnalyticsService {
autoMnemonic: settings.randomizeMnemonicOnStart,
locked: settings.server.locked,
gasLimit: settings.server.gasLimit,
gasPrice: settings.server.gasPrice
gasPrice: settings.server.gasPrice,
hardfork: settings.server.hardfork
}

this.user.set('cd1', config.hostname)
Expand All @@ -131,6 +132,7 @@ class GoogleAnalyticsService {
this.user.set('cd8', config.locked)
this.user.set('cd9', config.gasLimit)
this.user.set('cd10', config.gasPrice)
this.user.set('cd11', config.hardfork)
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/Services/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ const initialSettings = {
logger: null,
verbose: false,
gasLimit: 6721975,
gasPrice: 20000000000
gasPrice: 20000000000,
hardfork: "constantinople"
}
}

const defaultSettings = {
'server.gasLimit': initialSettings.server.gasLimit,
'server.gasPrice': initialSettings.server.gasPrice
'server.gasPrice': initialSettings.server.gasPrice,
'server.hardfork': initialSettings.server.hardfork
};

class Settings {
Expand Down