Dustin Brody
8a5e5334d6
re-implement attestation checking in 0.8.0 form and rename relevant function from checkAttestation(...) to spec's process_attestation(...), though there's a slight difference in how they're factored; remove a couple of pointless type conversion warnings; rename validate_indexed_attestation(...) to is_valid_indexed_attestation(...); remove verify_bitfield(...) not in 0.8.0; update AttestationData to 0.8.0 by using Checkpoint data structure; rename MAX_CROSSLINK_EPOCHS to MAX_EPOCHS_PER_CROSSLINK
2019-07-03 10:41:42 +03:00
Dustin Brody
d7905351eb
update get_crosslink_committee(...) to 0.8.0 and fix https://github.com/status-im/nim-beacon-chain/issues/307
2019-07-02 19:52:39 +03:00
Zahary Karadjov
bf037eab5e
Tentative bugfix: Reset testnet was producing a genesis state without validators
2019-07-01 16:20:55 +03:00
Zahary Karadjov
c98426586e
Fix the use of tests/simulation/run_node.sh
2019-07-01 15:36:01 +03:00
Dustin Brody
95dea4c165
mark get_attestation_data_slot(...), ProposerSlashing, AttesterSlashing, DepositData, BeaconBlock, Eth1Data, AttestationDataAndCustodyBit, and is_slashable_attestation_data(...) as 0.8.0; add Checkpoint object type
2019-07-01 14:44:57 +03:00
Dustin Brody
fa39eb82c4
do most of 0.8.0 BeaconState updating, in particular field renamings, re-orderings, etc; rm now-unnecessary genesis block creation aspects, towards the near-stub version in current spec as mostfields are 0/default/etc values
2019-07-01 14:44:57 +03:00
Dustin Brody
fb601bd5b8
rename BeaconState.validator_registry to BeaconState.validators
2019-07-01 14:44:57 +03:00
Dustin Brody
2ba14bc9af
update get_previous_epoch(...) to 0.8.0 and mark compute_committee(...) as 0.8.0
2019-07-01 14:44:57 +03:00
Dustin Brody
dc98ffb09b
update Validator to 0.8.0; update/refactor deposit contract/etc to constants category; mark process_rewards_and_penalties(...) as 0.8.0
2019-07-01 14:44:57 +03:00
Dustin Brody
607a7de5eb
rename get_epoch_start_shard(...) to 0.8.0 get_start_shard(...)
2019-07-01 14:44:57 +03:00
Dustin Brody
e4321dc4ed
Initial frozen phase 0/v0.8.0 spec ( #305 )
...
* rename slot_to_epoch(...) to compute_epoch_of_slot(...)
* rename aggregation_bitfield/custody_bitfield fields to aggregation_bits/custody_bits; rename convert_to_indexed(...) to get_indexed_attestation(...); mark BeaconBlockHeader as 0.8.0; update minimal preset MIN_ATTESTATION_INCLUSION_DELAY/time parameters in general to 0.8
* fix beacon node compilation; it used slightly different capitalizations of slot_to_epoch/slotToEpoch
* mark integer_squareroot(...), Deposit, VoluntaryExit, and Transfer as 0.8.0; rename get_epoch_start_slot(...) to compute_start_slot_of_epoch(...)
* add new Domain alias for uint64; rename bls_domain(...) to compute_domain(...), MAX_INDICES_PER_ATTESTATION to MAX_VALIDATORS_PER_COMMITTEE, and SignatureDomain to DomainType; update get_domain(...) to 0.8.0
* update/mark initiate_validator_exit(...) and Crosslink as 0.8.0; rename BeaconState.latest_block_roots -> BeaconState.block_roots; mark HistoricalBatch as 0.8.0
2019-07-01 09:53:42 +02:00
Dustin Brody
7356905f95
remove get_epoch_start_slot(...) kludge and update to work exactly as 0.7.1 specifies; remove unused get_attestation_participants_cached(...); update AttestationData to 0.7.1 (being the last data structure, I believe, remaining for such; remove potentially spurious/certainly not-in-spec assertion from compute_committee(...); fix state sim to work with new get_epoch_start_slot/AttestationData/etc setup where it can't stuff all shards' attestations from same slot in the same MIN_ATTESTATION_INCLUSION_DELAY rotating/circular buffer of seq[Attestation]s without more involved shuffling of shard/slot calculation order; fix attestation pool testing to be consistent with get_epoch_start_slot(...) ( #302 )
2019-06-29 09:17:24 +00:00
Mamy Ratsimbazafy
214860cb88
Split state_transition ( #301 )
2019-06-28 13:44:44 +00:00
Zahary Karadjov
0d37ed7a2a
Fix a problem for the bootstrap nodes
...
connectToNetwork is executed for the bootstrap node as well, but
it should not quit when peers are not yet present.
2019-06-28 14:55:21 +03:00
Jacek Sieka
1ce459bcdb
Merge commit 'b0d27b9'
2019-06-27 14:52:46 +02:00
Jacek Sieka
b0d27b9acc
disambiguate IPPROTO_TCP
2019-06-27 14:52:32 +02:00
Dustin Brody
43a9e904cf
replace get_attestation_slot(...) with 0.7.1 get_attestation_data_slot(...) and update all callers; update AttestationData to be almost 0.7.1, except nonextistent slot field; update Crosslink and get_winning_crosslink_and_attesting_indices(...) to 0.7.1 ( #297 )
2019-06-25 11:17:08 +00:00
Zahary Karadjov
1eef531259
Attempt to fix the build on Windows
2019-06-25 07:00:31 +03:00
Zahary Karadjov
69f3095fac
Remove temp debugging code; Quit if you fail to connect to the network
2019-06-24 19:38:19 +03:00
Zahary Karadjov
31baa77742
Restore building with chronicles_sinks=json
2019-06-24 19:38:19 +03:00
Zahary Karadjov
7d174b548a
Switch the testnet1 back-end to libp2p_native
...
Further simplifications and removal of support for multiple network
back-ends per testnet.
2019-06-24 19:38:19 +03:00
Zahary Karadjov
0116bdaed7
temporary code to debug issues with the testnet bootstrap node
2019-06-24 19:38:19 +03:00
Dustin Brody
c7e06374f4
Remove get_crosslink_committees_at_slot and fix research/state_sim ( #291 )
...
* migrate attestation pool tests from get_crosslink_committees_at_slot(...) to get_crosslink_committee(...)
* rm obsolete, unused get_crosslink_committees_at_slot_cached(...) and migrate tests/test_state_transition from get_crosslink_committees_at_slot(...) to get_crosslink_committee(...)
* migrate tests/testutil from get_crosslink_committees_at_slot(...) to get_crosslink_committee(...)
* use more pervasive caching infrastructure, initially of compute_committee; remove buggy (and per-index) shuffling to fix research/state_sim, which was noticing validators on multiple shard committees; rm now-unused specific get_attesting_balance_cached
* add some get_active_validator_index caching
* rm obsolete/unused get_attesting_indices_cached
* rm get_crosslink_committees_at_slot(...)
* some more 0.7 changes -- some of which can't be completed pending some data structure updates -- and shard handling changes to offset with epoch start shards
2019-06-24 09:21:56 +00:00
Zahary Karadjov
c751285112
Implement all libp2p_native response codes as specified in the latest proposal
2019-06-24 05:34:22 +03:00
Zahary Karadjov
84afb77b27
Restore compilation with libp2p_native after the latest changes in the spec back-end
2019-06-24 05:34:22 +03:00
Zahary Karadjov
1bcd94a7da
Switch to a model where the testnets are stricly associated with a network back-end type
2019-06-24 05:34:22 +03:00
Zahary Karadjov
44fc05f864
Fix the build for chronicles_sinks=json
2019-06-24 05:34:22 +03:00
Zahary Karadjov
976438d7fc
reset all testnet flavours together
2019-06-24 05:34:22 +03:00
Zahary Karadjov
25494aa2fb
Better error message on incompatible validator data when resetting a testnet
2019-06-24 05:34:22 +03:00
Zahary Karadjov
e228c2dbcb
Implement the even/odd request ID scheme; Handle more edge cases; Break the cyclic imports
2019-06-24 05:34:22 +03:00
Zahary Karadjov
96e2a02faf
Respect the port configuration and NAT setup when using LibP2P
2019-06-24 05:34:22 +03:00
Zahary Karadjov
26ef341760
Use the libp2p_spec back-end by default
2019-06-24 05:34:22 +03:00
Zahary Karadjov
15fdf78d6a
[LibP2P] Persistent network key for the bootstrap node
2019-06-24 05:34:22 +03:00
Zahary Karadjov
12e9367f78
Improved error handling; Simple test case for connecting 2 peers
2019-06-24 05:34:22 +03:00
Zahary Karadjov
877b22cfb8
Share more code between the libp2p backends
2019-06-24 05:34:21 +03:00
Zahary Karadjov
87601a5eae
Share more code between the libp2p backends
2019-06-24 05:34:21 +03:00
Zahary Karadjov
3b166be166
Restore compilation in RLPx mode; More libp2p progress
2019-06-24 05:34:21 +03:00
Zahary Karadjov
e177d17762
Further simplifications
2019-06-24 05:34:21 +03:00
Zahary Karadjov
c060c0fc5d
Simplified the 'spec' back-end by movign more logic into the shared DSL module
2019-06-24 05:34:21 +03:00
Zahary Karadjov
ea4690d567
A new P2P backend implementing the libp2p networking according to the official spec
2019-06-24 05:34:21 +03:00
Zahary Karadjov
f4a96bc3f3
[WIP] Restore the Lib2P2 builds and implement the latest wire spec
...
Depends on https://github.com/status-im/nim-eth/pull/54
2019-06-24 05:34:21 +03:00
Mamy André-Ratsimbazafy
6f77351757
Update fixtures submodule to latest (remove deprecated eth2.0-tests)
...
https://github.com/status-im/nim-eth2-official-tests/issues/1
https://github.com/status-im/nim-beacon-chain/pull/292
2019-06-21 10:33:29 +02:00
Mamy Ratsimbazafy
cacb7d6a2b
Remove v0.5 state tests ( #292 )
2019-06-21 10:16:14 +02:00
Mamy Ratsimbazafy
0d82be5af3
Update tests result to 0.7.1 ( #293 )
2019-06-21 10:14:16 +02:00
Dustin Brody
13381c8fea
update everything https://github.com/ethereum/eth2.0-specs/releases/tag/v0.7.1 leaves unchanged from v0.7.0 to v0.7.1 ( #290 )
2019-06-18 15:34:30 +00:00
Ștefan Talpalaru
7293c6a420
Merge branch 'rocksdb'
2019-06-17 16:55:56 +02:00
Ștefan Talpalaru
308a11f55a
build_rocksdb.sh
2019-06-17 14:51:06 +02:00
Mamy Ratsimbazafy
0926ebf8fe
[Tests] SSZ unsigned integer + test suite genericity ( #284 )
...
* Generics over tests (https://github.com/status-im/nim-serialization/issues/4 , https://github.com/status-im/nim-serialization/issues/5 , https://github.com/nim-lang/Nim/issues/11225 )
* Skeleton of SSZ uint tests
* Check all primitive uint types
* Add deserialization test. "wrong length" skipped due to https://github.com/status-im/nim-beacon-chain/issues/280
* Move test types to their specific test files
* Stint also sometimes throws an AssertionError for invalid ranges
* Add debug path for Access denied issue in Appveyor 64-bit (https://ci.appveyor.com/project/nimbus/nim-beacon-chain/builds/25278666/job/fs8q0bcluvj2gdor#L866 )
* indent the Appveyor debug info
2019-06-17 09:29:23 +00:00
Dustin Brody
e9180c490e
more 0.7.0 updates ( #287 )
...
* update Deposit and BeaconBlockHeader to 0.7.0
* update get_total_balance(...) and get_base_reward(...) to 0.7.0
* rename initial value constant BLS_WITHDRAWAL_PREFIX_BYTE to BLS_WITHDRAWAL_PREFIX
* mark minimal presets as entirely migrated to 0.7.0; update process_rewards_and_penalties(...) to 0.7.0
* specify that targeting 0.7.0; adopt 0.7.0 refactoring of bls_domain/get_domain to update get_domain(...) to 0.7.0; mark that mainnet constant presets and block header processing are 0.7.0-consistent; update process_justification_and_finalization to 0.7.0 to fix potential underflow errors
* address mratsim's comment to copy whole spec comment
2019-06-14 16:21:04 +00:00
Dustin Brody
2a6e64d3f9
0.7.0 updates including semantic changes ( #285 )
...
* update get_previous_epoch(...)
* update BeaconBlock to 0.7.0 by renaming previous_block_root field to parent_root
2019-06-14 13:50:47 +00:00