Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIP forkproperties #710

Merged
merged 28 commits into from
Nov 23, 2018
Merged

AIP forkproperties #710

merged 28 commits into from
Nov 23, 2018

Conversation

beidouz
Copy link
Contributor

@beidouz beidouz commented Nov 16, 2018

Notice

It is not allowed to submit your PR to the master branch directly, please submit your PR to the master-pre-merge branch.

Description

Please include a brief summary of the change that this pull request proposes. Include any relevant motivation and context. List any dependencies required for this change.

  • add fork logic to getPrecompileContract

Fixes Issue # .

Type of change

Insert x into the following checkboxes to confirm (eg. [x]):

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

Please describe the tests you used to validate this pull request. Provide any relevant details for test configurations as well as any instructions to reproduce these results.

Verification

Insert x into the following checkboxes to confirm (eg. [x]):

  • I have self-reviewed my own code and conformed to the style guidelines of this project.
  • New and existing tests pass locally with my changes.
  • I have added tests for my fix or feature.
  • I have made appropriate changes to the corresponding documentation.
  • My code generates no new warnings.
  • Any dependent changes have been made.

@AionJayT AionJayT added this to the 0.3.2 milestone Nov 16, 2018
@AionJayT AionJayT changed the title Aip forkproperties AIP forkproperties Nov 20, 2018
Copy link
Contributor

@aion-kelvin aion-kelvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good overall. Have one question and a few minor/optional suggestions.

modAionImpl/src/org/aion/zero/impl/config/CfgAion.java Outdated Show resolved Hide resolved
modAionImpl/src/org/aion/zero/impl/config/CfgAion.java Outdated Show resolved Hide resolved
modAionImpl/src/org/aion/zero/impl/config/CfgAion.java Outdated Show resolved Hide resolved
@@ -214,6 +227,7 @@ private void updateNetworkExecPaths() {
networkConfigDir = new File(CONFIG_DIR, network);
baseConfigFile = new File(networkConfigDir, configFileName);
baseGenesisFile = new File(networkConfigDir, genesisFileName);
baseForkFile = new File(networkConfigDir, forkFileName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fork files need to be initialized for the case where the config files reside directly in the config folder as used by old kernels (implemented in else clause at line 210 above). I propose that we assume that anyone using the old config location takes the time to copy the fork.properties file.

script/prepack.sh Show resolved Hide resolved
@@ -102,6 +102,11 @@
private static final File mainnetGenesis = new File(MAIN_CONFIG_PATH, genesisFileName);
private static final File testnetGenesis = new File(TEST_CONFIG_PATH, genesisFileName);

private static final File fork = new File(TEST_RESOURCE_DIR, forkFileName);
private static final File oldFork = new File(CONFIG_PATH, forkFileName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a test for behavior with old kernels config using the variable above

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable to support the old config compatibility for the fork. And will put it in the release note.

modAionImpl/test/org/aion/zero/impl/AionHubTest.java Outdated Show resolved Hide resolved
modAionImpl/src/org/aion/zero/impl/config/CfgAion.java Outdated Show resolved Hide resolved
Copy link
Contributor

@AlexandraRoatis AlexandraRoatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handled config migration in #718

@AionJayT AionJayT merged commit 0394a42 into AIP_redo Nov 23, 2018
@AionJayT AionJayT deleted the AIP_forkproperties branch December 11, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants