-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/wire #133
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
Merged
Merged
Feature/wire #133
Changes from all commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
183744b
Fix BenchmarkLauncher compilation
Nashatyrev 6c16c13
Add a dedicated storage for blockHeaders. For now it just refers to b…
Nashatyrev 8cc3cc5
Initial draft drop of wire implementation
Nashatyrev 97ac010
Differentiate raw Message and MessagePayload. Minor wire refactorings…
Nashatyrev b01d419
Differentiate Response and Request MessagePayload.
Nashatyrev 24c7cd3
Draft intermediate commit. Add some sync related code
Nashatyrev a2edd67
Intermediate sync manager draft commit
Nashatyrev ad2261d
Implement simple sync strategy
Nashatyrev 98c922a
Channel draft implementation
Nashatyrev 731571e
Complete BeaconPipeline. Bunch of Channel fixes. Create and pass Beac…
Nashatyrev 698a344
Fix assertion
Nashatyrev c330326
Add toString()
Nashatyrev 7ee4d64
Refactor SimulatorLauncher for using from tests
Nashatyrev 98fe2f3
Add SyncTest
Nashatyrev d41de50
Fix block root calculation (should be truncated hash)
Nashatyrev 313da29
Fix several sync bugs
Nashatyrev 06272b5
Fix another couple of bugs in sync code
Nashatyrev d708f5c
Complete the SyncTest simple case
Nashatyrev 597e474
Add missing WireApi's. Add notified new blocks to the SyncManager
Nashatyrev 36491f7
Add simple netty server/client Channel implementation
Nashatyrev c243cca
Extract Server/Client interfaces. Fix a couple of issues
Nashatyrev 1dc9a83
Add Peer implementation and simple PeerManager
Nashatyrev 27f12de
Some refactorings.
Nashatyrev bd6dea6
Further work on sync by wire
Nashatyrev 494b72c
Add some toString's
Nashatyrev 8222598
Add SyncManager Long/Short mode
Nashatyrev 7ed10a7
Move MDCControlledSchedulers to a separate class. Remove unnecessary …
Nashatyrev 062fa13
Add NodeLauncher and NodeTest where one peer syncs to another by TCP.…
Nashatyrev cc62328
Refactor: move netty related code to a separate package
Nashatyrev 5f1850c
WireApiSyncRouter feeds active peers in cycle
Nashatyrev 1bf6cd0
Add missing hashCode() methods
Nashatyrev b9156a6
Implement flood pub for new blocks and attestations
Nashatyrev 1042271
Fix ConnectionManager, add test
Nashatyrev f3fda15
Minor cleanup
Nashatyrev 1a06c0c
Draft template for Node launcher
Nashatyrev 178706f
Merge remote-tracking branch 'origin/develop' into feature/wire
Nashatyrev e401c85
Resolve merge compile conflicts
Nashatyrev 1d6823a
Fix build error
Nashatyrev 4e25524
Use common classes for BenchmarkRunner
Nashatyrev 89b5755
Fix test dependencies
Nashatyrev 6b547fa
Filter 'future' attestations in ObservableState
Nashatyrev 234f1da
Expose 'syncMode' from SyncManager
Nashatyrev 7ea8888
Add toString()
Nashatyrev e6966f9
Make NodeTest a unit test
Nashatyrev 9d7f0a1
Merge remote-tracking branch 'origin/develop' into feature/wire
Nashatyrev 215c78e
Fix mode switching
Nashatyrev 1701eb5
Fix NodeTest: check sync mode on different stages
Nashatyrev 13d4804
Add specHelpers cache control via config
Nashatyrev 069f448
Add DebugCacheFactory
Nashatyrev 9d6bc62
Temporarily disable cache for tests (due to invalid fork cache handling)
Nashatyrev e4e3da1
Fix the test
Nashatyrev 0a32744
Add hashCode()
Nashatyrev 2903a44
Extract useful TestDataFactory test util from ModelSerializerTest
Nashatyrev 9d6ac85
Close server on test complete
Nashatyrev 52ba766
Remove obsolete test
Nashatyrev c51831f
Disable specHelpers cache for tests due to incorrect fork handling
Nashatyrev b129310
Removed @Test from the test util class
Nashatyrev feffd76
Remove obsolete test util field
Nashatyrev 4a748a1
Refactor Validator config
Nashatyrev 99d331e
Create NodeLauncher from config
Nashatyrev 094b39f
Reduce loglevel for StateCachingTransition
Nashatyrev 35e3fea
Add 'node' command line options
Nashatyrev d2c370f
Fix connectionManager
Nashatyrev cabbeac
Fix peerManager
Nashatyrev de938b9
Fix SyncServer to correctly manage empty slots
Nashatyrev ad208da
Enable syncManager
Nashatyrev a41153b
Use SyncQueue production params
Nashatyrev 8ebb472
Synchronize the BlockTree class
Nashatyrev 9ae41e5
Fix test compile error
Nashatyrev 1d28c91
Don't recalculate empty slot transitions from head on every slot
Nashatyrev 5a69b83
Fix typo
Nashatyrev f585230
Fix: bodies can be the same for different blocks. Thus duplicates are…
Nashatyrev ba58fde
Rely on SpecHelpers.verify_attestation when populating pending operat…
Nashatyrev 37d63dd
Temporarily make the sync less aggressive
Nashatyrev 1dd9506
Make deposit amount configurable
Nashatyrev f59a680
Move netty to our Schedulers. Add node name for logs and thread namin…
Nashatyrev 95d76ba
Return meaningful result from BeaconChain.insert()
Nashatyrev f317c9b
Submit to SyncManager not only inbound new blocks but own created and…
Nashatyrev 941b61a
Fix concurrent modification, make stream elements (arrays) immutable
Nashatyrev 14905c9
Write unhandled exceptions to log by default
Nashatyrev 4aaf917
Fix Log4j warnings at startup
Nashatyrev f7702f1
Set test genesis slot to 0
Nashatyrev 56b12db
Wire javadoc added
Nashatyrev 1da43be
Make syncManager sync mode delays configurable (should be 0 delay for…
Nashatyrev 322f7be
Fix tests
Nashatyrev 485b05d
Add --genesis-time cli option. Add default genesis time generation
Nashatyrev b227b27
Add uncaught exceptions handler for DefaultScheduler Threads to repor…
Nashatyrev 56af85d
Don't stop Validator service subscription on internal validator error
Nashatyrev f8b7dcd
Don't generate ObservableState if the current slot is far above the l…
Nashatyrev c4d232d
Fix build script for node module
mkalinin 59a0b23
Modify zip() operator prefetch parameter to 1. By default it is 32 an…
Nashatyrev df8b760
Add ability to disconnect when removing activePeer
Nashatyrev 257403b
Merge remote-tracking branch 'origin/feature/wire' into feature/wire
Nashatyrev 124780f
New line at the end
Nashatyrev 481a170
Fix the test
Nashatyrev cea0aad
Reword comment
Nashatyrev 2d77a30
Rename OtherError to UnexpectedError
Nashatyrev 0d477ef
Merge remote-tracking branch 'origin/develop' into feature/wire
Nashatyrev 8013b77
Add some test out
Nashatyrev be9c3aa
Fix tests: due to finalization changes we need a bit longer chain to …
Nashatyrev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
4 changes: 4 additions & 0 deletions
4
chain/src/main/java/org/ethereum/beacon/chain/storage/BeaconChainStorage.java
This file contains hidden or 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
This file contains hidden or 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
54 changes: 54 additions & 0 deletions
54
.../src/main/java/org/ethereum/beacon/chain/storage/impl/DelegateBlockHeaderStorageImpl.java
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| package org.ethereum.beacon.chain.storage.impl; | ||
|
|
||
| import java.util.Optional; | ||
| import javax.annotation.Nonnull; | ||
| import org.ethereum.beacon.chain.storage.BeaconBlockStorage; | ||
| import org.ethereum.beacon.consensus.hasher.ObjectHasher; | ||
| import org.ethereum.beacon.core.BeaconBlock; | ||
| import org.ethereum.beacon.core.BeaconBlockHeader; | ||
| import org.ethereum.beacon.db.source.DataSource; | ||
| import tech.pegasys.artemis.ethereum.core.Hash32; | ||
|
|
||
| public class DelegateBlockHeaderStorageImpl implements DataSource<Hash32, BeaconBlockHeader> { | ||
|
|
||
| private final BeaconBlockStorage delegateBlockStorage; | ||
| private final ObjectHasher<Hash32> objectHasher; | ||
|
|
||
| public DelegateBlockHeaderStorageImpl( | ||
| BeaconBlockStorage delegateBlockStorage, | ||
| ObjectHasher<Hash32> objectHasher) { | ||
| this.delegateBlockStorage = delegateBlockStorage; | ||
| this.objectHasher = objectHasher; | ||
| } | ||
|
|
||
| @Override | ||
| public Optional<BeaconBlockHeader> get(@Nonnull Hash32 key) { | ||
| return delegateBlockStorage | ||
| .get(key) | ||
| .map(this::createHeader); | ||
| } | ||
|
|
||
| private BeaconBlockHeader createHeader(BeaconBlock block) { | ||
| return new BeaconBlockHeader( | ||
| block.getSlot(), | ||
| block.getPreviousBlockRoot(), | ||
| block.getStateRoot(), | ||
| objectHasher.getHash(block.getBody()), | ||
| block.getSignature()); | ||
| } | ||
|
|
||
| @Override | ||
| public void put(@Nonnull Hash32 key, @Nonnull BeaconBlockHeader value) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @Override | ||
| public void remove(@Nonnull Hash32 key) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @Override | ||
| public void flush() { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Why not wrap it with dedicated interface like others. Or, lets postpone it?
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.
Let's postpone, since I'm not yet sure how this header storage should be organized