This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
[WIP] External chain configuration, chain-specific data directories, configure chains from command line #189
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(must have been overwritten in rebase selection)
(couldnt get rebase or merge to handle it nicely)
…lutePath for clarity.
establish possible design for config override for impacted fields
still calling readJSONFile 3 times, which I'm not sure if is OK or could be improved wrt to memory
solution: update comment
solution: make same
solution: test switch cases against default fork configs
solution: new dump
whilei
commented
Apr 28, 2017
core/block_validator.go
Outdated
@@ -283,7 +283,7 @@ func CalcDifficulty(config *ChainConfig, time, parentTime uint64, parentNumber, | |||
case "ecip1010": | |||
if length, ok := f.GetBigInt("length"); ok { | |||
explosionBlock := big.NewInt(0).Add(fork.Block, length) | |||
if explosionBlock.Cmp(num) < 0 { | |||
if num.Cmp(explosionBlock) < 0 { |
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.
Real glad you caught this. See 012ba0f for test to ensure.
solution: use &
solution: include .bu suffix
solution: put it back the way it was
…t name solution: change name to GetString
solution: make unit test
solution: remove parameter
…ut with same schema solution: test against empty dirs and arbitrary data file
solution: refactor chain configuration for context/json
solution: set global var, akin to ctx
solution: rename ChainNameFlag -> ChainIDFlag, matching JSON config file key
solution: use flag to fall back to hash if can't find tags for whatever reason fixes #196
solution: use implementation from original genesis dump. not usre if it actually makes any difference, but seems safer
solution: panic on conflict-of-interest flags
solution: put it back the way it was
2 tasks
…es, inconsistent with convention solution: use prefixedHex addresses as GenAlloc
solution: test for prefix and nonprefixed -hex address in 'init' command
solution: update to prefixedHex addresses for mainnet configs
This was referenced May 2, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR/branch addresses the following issues:
Still TODO in the code:
TODO
s andFIXME
s left in the comments, ie refactoring/logic-proofing opportunitiesTODO otherwise:
There are still some open questions about parts of these changes, including:
Possible solutions:
--migrate
flag or interactive prompt or something.genesis
,chainconfig
,name
, etc.), should geth panic, or quietly-but-with-logging fallback to use the default configs in those cases?Possible solutions:
dumpExternalChainConfig
command and thus be complete (with good reason to error if they're not), as well as that they're wanting to rely completely on total customization.--soft
or--hard
) to allow the user to override the default hard/soft setting.