Bloom upgrade in master#2624
Conversation
d4f9674 to
dff803d
Compare
dff803d to
1d3934b
Compare
|
should add a comment warning about the dangers of adding future migrations which affect the bloom without adjusting the inplace migrations. See https://github.com/ethcore/parity/pull/2411#issuecomment-251810990 -- adding this mechanism to master is just technical debt we'll have to clean up later. |
| } | ||
| } | ||
|
|
||
| println!("Adding/expanding accounts bloom (one-time upgrade)"); |
There was a problem hiding this comment.
same println! issue as the beta PR.
| let bloom_journal = { | ||
| let mut bloom = Bloom::new(ACCOUNT_BLOOM_SPACE, DEFAULT_ACCOUNT_PRESET); | ||
| // no difference what algorithm is passed, since there will be no writes | ||
| let state_db = journaldb::new( |
There was a problem hiding this comment.
this comment is actually wrong -- OverlayRecent will work with Archive, but not vice-versa, as Archive wouldn't be able to read the latest state from the journal overlay.
There was a problem hiding this comment.
It's also probably best to just take the pruning argument as a parameter -- we have it in the migration phase, so there's no point firing shots in the dark. I don't see why refcounted and light pruning wouldn't be supported with this migration.
There was a problem hiding this comment.
@rphmeier
nobody had issues running migration, this code is already used for several beta versions
where do you think will be fail there?
There was a problem hiding this comment.
@NikVolf well, really it's because nobody uses light or refcounted but it's probably better to say "migration unsupported for pruning algorithm {}" than to fail unexpectedly with TrieError::NonexistantStateRoot. Although that's not really correct either, because there's no reason that the migration would be unsupported for that pruning algorithm because it will work for an arbitrary pruning algorithm.
There was a problem hiding this comment.
why it will fail with this error?
there is only one state root used there, which is for the best block, no?
|
@rphmeier i don't see where exactly this warning will have any use |
|
@NikVolf If you imagine a migration I'm not saying that it has to be fixed right away, but when we introduce solutions which won't function correctly for some edge cases, they're usually marked with a |
|
@rphmeier |
|
Ok, maybe you can explain the flaw in the reasoning here, but the way I see it is:
To avoid this, you'd have to write your 10 -> 11 migration in such a way that it can handle blooms which have and have not been in-place upgraded without a version bump. |
|
@rphmeier |
|
Looks like trie iterations take too long on many machines for 10M+ accounts |
|
closing for now; probably worth keeping the code in general since we'll want to rebuild after we've done the pruning and after a sufficiently high number of suicides have happened. |
had to move the same in-place upgrade logic that we had in beta