tersec
5b13a5ba10
update attestation extended validation to v1.0.0-rc.0 ( #1889 )
...
* update attestation extended validation to v1.0.0-rc.0
* attestation block and target must be within same epoch
* remove duplicate attestation epoch/target epoch check
* in spec now
2020-10-19 09:25:06 +00:00
Jacek Sieka
df43b8aa8b
save some more states after all ( #1887 )
...
Don't save states when replaying history, but do save states when
applying new blocks (!)
2020-10-18 15:47:39 +00:00
Zahary Karadjov
dbc90e998a
Add Disc v5.1 bootstrap nodes for Zinken
...
Also prepares the Makefiles for supporting Medalla
through a separate binary
2020-10-18 12:44:52 +03:00
Zahary Karadjov
d98be078c3
Address #1690 Min password entropy
2020-10-16 19:34:26 +03:00
Zahary Karadjov
9899578e1c
Update get_eth1_data from v0.11.1 to v1.0.0-rc
2020-10-16 11:46:53 +03:00
Dustin Brody
9a543e0af7
partial hotfix for #1879 crash
2020-10-16 11:46:19 +03:00
Zahary Karadjov
948d15ea95
Follow-up on #1687 Don't ask for password on invalid keystores
2020-10-16 11:45:39 +03:00
Viktor Kirilov
db70f066ba
fixed all crashes which can be triggered through the validator RPC API - fixes #1680
2020-10-15 20:19:43 +03:00
Viktor Kirilov
7ed885f144
configuring a writer for the dynamic log output device for the VC binary as well (same as in the BN)
2020-10-15 20:19:10 +03:00
cheatfate
7ad59b1852
Bump nim-stew.
2020-10-15 20:18:33 +03:00
cheatfate
1742a82ca7
Proper fix for writeFile() places.
...
Comment unused/insecure procedure.
2020-10-15 20:18:33 +03:00
cheatfate
84fe294c00
Fix protection of data folder and security files using Windows ACL.
2020-10-15 20:18:33 +03:00
Zahary Karadjov
5f6bdc6709
Store all deposit-derived data in memory
2020-10-15 20:15:51 +03:00
Zahary Karadjov
7a577b2cef
More tests for getBlockRange
2020-10-15 20:15:51 +03:00
Zahary Karadjov
080609eee1
Address #1366 Avoid uint64 overflow in getBlockRange when skipStep is large
2020-10-15 20:15:51 +03:00
Zahary Karadjov
2152dc6136
Simplify the mainchain monitor
2020-10-15 20:15:51 +03:00
Zahary Karadjov
ce1fda1195
Store the deposits and the immutable validator data in Sqlite
2020-10-15 20:15:51 +03:00
Zahary Karadjov
e69af00e3a
Don't penalize flooding peers; Just rate limit them
2020-10-15 20:15:51 +03:00
Zahary Karadjov
4d66914f5a
Fix the test suite
2020-10-15 20:15:51 +03:00
Zahary Karadjov
f0892ce934
Fix compilation problems on Windows
2020-10-15 20:15:51 +03:00
Zahary Karadjov
e6320e5881
Address #1584 Don't keep all deposits in memory (persist them to disk)
2020-10-15 20:15:51 +03:00
Zahary Karadjov
bc8acdb9de
Switch to an in-house clearScreen to avoid problems with exception tracking
2020-10-15 20:15:51 +03:00
Zahary Karadjov
69e498dc00
Address #1689 and #1517 Usability and security improvements in wallet creation
2020-10-15 20:15:51 +03:00
Zahary Karadjov
02a3770803
Adds a fuzzing test for the validator client CLI
...
Also removes an obsolete way to add validators through the command line
2020-10-15 20:15:51 +03:00
Zahary Karadjov
8ce0fc3a89
Address #1687
...
This addresses the issues by detecting and rejecting keystores with
incorrect PBKDF2 and SCrypt params. It also bumps the version of
nim-json-serialization to include a bugfix for incorrect parsing
of json files featuring comments.
2020-10-15 20:15:51 +03:00
Zahary Karadjov
cd949a2b81
Address #1691 More pervasive handling of Ctrl+C
2020-10-15 20:15:51 +03:00
Zahary Karadjov
8a6281aad2
Simple cost model for sync requests; Penalize peers perfoming flooding or invalid requests
2020-10-15 20:15:51 +03:00
Jacek Sieka
6b9419e547
fix db growth on attestation processing ( #1860 )
...
It turns out that we often save lots of states in the database that are
the result of empty slot processing only - here, we make sure to only
save a state if a block follows - this fixes several issues:
* empty slot states are not always pruned leading to state database size
explosion
* storing states is (very) slow which slows down processing in general,
so we should only do it when it's likely to be useful
* attestation processing doesn't get stuck on saving random states that
won't appear in the chain history
2020-10-15 14:28:44 +02:00
Viktor Kirilov
4e73d10f86
removed 2 buggy RPC API endpoints - there are 2 well functioning ones in validator_api.nim anyway ( #1867 )
2020-10-15 14:26:59 +02:00
tersec
da59f45a90
update spec/datatypes spec refs from v0.12.3 to v1.0.0 ( #1866 )
2020-10-14 10:00:27 +00:00
tersec
513ba72b9a
add v1.0.0-rc.0 support behind compile-time flag ( #1852 )
...
* add v1.0.0-rc.0 support behind compile-time flag
* keep runtime presets consistent
2020-10-13 17:21:25 +00:00
tersec
3ee2dd8da4
p2p-interface spec ref bump (except non-updated places) ( #1862 )
2020-10-12 14:37:14 +00:00
tersec
1994ffe5a0
update 130+ spec references from v0.12.3 to v1.0.0-rc1 ( #1854 )
2020-10-12 08:59:24 +00:00
Zahary Karadjov
00a8a68671
Address #1695
...
Better error messages when the beacon node is asked to listen on a
reserved port (0) or an already taken one.
2020-10-09 16:39:03 +03:00
tersec
d69d89866e
fix logtrace in local network sim ( #1840 )
2020-10-09 10:58:54 +02:00
tersec
b79e5f8af5
update nim-beacon-chain to nimbus-eth2 in beacon_chain/, ncli/, tests/, and README.md ( #1843 )
2020-10-08 19:02:05 +00:00
tersec
c0aa2f1e58
update process_slashings() to use PROPORTIONAL_SLASHING_MULTIPLIER ( #1841 )
2020-10-08 18:00:07 +00:00
Eugene Kabanov
3bd7ab4c20
Do not reward empty responses. ( #1827 )
...
Request status from peers every StatusExpirationTime.
2020-10-08 14:50:48 +02:00
tersec
f08f44b9a2
in exit pool, bundle receive messages into beaconblocks ( #1812 )
...
* in exit pool, filter out already-packaged messages; bundle remaining messages into beaconblocks
* filter messages at block construction time
* allow adding up to intended capacity of buffers, beyond per-block limits
* document rationale/design for filtering mechanism
2020-10-07 16:57:21 +00:00
Zahary Karadjov
b46c8410a6
Retire Spadina and prepare for the Zinken network
2020-10-07 18:12:21 +03:00
Mamy Ratsimbazafy
6b9090398e
[JSON-RPC] Prevent silent uint conversion ( #1819 )
...
* Prevent silent uint conversion
* bump json-rpc
2020-10-07 15:02:54 +02:00
Zahary Karadjov
deaddc1fc0
Address review comments
2020-10-07 09:32:03 +03:00
Zahary Karadjov
aed291128a
Add support for starting from weak subjectivity checkpoints
...
Also removes the `genesis.ssz` file stored in the data folder.
The `medalla-fast-sync` target has been adapted to use the new features.
2020-10-07 09:32:03 +03:00
Zahary Karadjov
2c06492407
Address #1728
2020-10-06 15:46:22 +03:00
Zahary Karadjov
950bcd0f6d
Address #1729 : Min password length
2020-10-06 15:46:22 +03:00
Zahary Karadjov
78953fd9b5
Address #1729 : NFKD Normalization
2020-10-06 15:46:22 +03:00
Zahary Karadjov
fec4b5014d
Address #1694
2020-10-06 15:46:22 +03:00
Zahary Karadjov
47d4899911
Wallet creation does not allow overwriting an existing wallet
2020-10-06 15:46:22 +03:00
Zahary Karadjov
9d23094c68
Address #1692
2020-10-06 15:46:22 +03:00
Eugene Kabanov
27fc8bcc80
Address #1538 and do not penalize peers for empty response. ( #1811 )
2020-10-06 14:10:02 +02:00
Mamy Ratsimbazafy
6bb6b66766
Partial LTO ( #1789 )
...
* initial partial LTO example
* Add select private key related files to ignore LTO
* Apply to keystores
2020-10-06 13:38:18 +02:00
Mamy Ratsimbazafy
c92d228ec8
Fix non-split attesting protection ( #1804 )
...
* address #1679 - att protection in non-split mode
* AttachedValidator public_key -> pubkey
* Always build with slashing protection
* Remove now unnecessary forwarding impl proc
2020-10-06 10:51:33 +02:00
tersec
5354a0a3d5
fix #1585 and restore storeLEBytes on big-endian systems ( #1796 )
...
* fix #1585 and restore storeLEBytes on big-endian systems
* switch to using stew/endians2
* create static endians2-like shim in bitseqs
2020-10-06 08:00:11 +00:00
Viktor Kirilov
8c59b92081
fixed #1663 - Interger overflow in compute_start_slot_at_epoch through RPC ( #1810 )
...
* fixed #1663 - Interger overflow in compute_start_slot_at_epoch through RPC
* changed the way the overflow check is done - took the approach from PR #1797 - see the comment in PR #1810 for more details
2020-10-05 21:58:30 +00:00
cheatfate
00a500ef3c
Fix rebase issues.
2020-10-05 22:19:50 +03:00
cheatfate
f091c8d4df
Add chronicles.formatIt for PublicKey.
...
Fix logs.
Rename checkFilePermissions to checkSensitiveFilePermissions.
2020-10-05 22:19:50 +03:00
cheatfate
dd8b73c85c
Remove `keypath` and set version to 1 for network keystorage.
2020-10-05 22:19:50 +03:00
cheatfate
9441e912cb
Merge different places of keyboard input to keyboardCreatePassword() and keyboardGetPassword().
...
Fix Windows problem with english words array.
Add checksum for english words array verification.
2020-10-05 22:19:50 +03:00
cheatfate
868ce14762
Fix compilation issue.
2020-10-05 22:19:50 +03:00
cheatfate
82228fe471
Fix last createDir.
2020-10-05 22:19:50 +03:00
cheatfate
86139839f1
Add permissions checks and handling to wallets and bls keystores.
2020-10-05 22:19:50 +03:00
cheatfate
fc09c2b3d4
Fix compilation problem.
2020-10-05 22:19:50 +03:00
cheatfate
1d76683a8b
Fix os dependency.
2020-10-05 22:19:50 +03:00
cheatfate
20f695515a
Fix localtestnet simulation.
2020-10-05 22:19:50 +03:00
cheatfate
add22a20e1
Update local_testnet and simulation scripts to use netkey-file and insecure-netkey-password.
...
Add more logging
2020-10-05 22:19:50 +03:00
cheatfate
e1182f8000
Add insecure password for automated testing.
...
Fix checkDataDir to run before setupLogging.
2020-10-05 22:19:50 +03:00
cheatfate
e43af4e978
Fix CLI option.
2020-10-05 22:19:50 +03:00
cheatfate
40f2b74f73
Add keystore management and interactive password handling.
2020-10-05 22:19:50 +03:00
cheatfate
ae72c08573
Fix utils problem.
2020-10-05 22:19:50 +03:00
cheatfate
cec4ad2717
Refactor keystore.nim to include network key storage too.
...
Use constant-time hex encoding/decoding procedures.
Add tests for network key storage.
2020-10-05 22:19:50 +03:00
cheatfate
c5c788a9db
Secure network key file and data directory.
2020-10-05 22:19:50 +03:00
Zahary Karadjov
d9738b43b3
Revert "Address issue #1538."
...
This reverts commit 1be3fd53b1
.
2020-10-05 19:25:47 +03:00
cheatfate
1be3fd53b1
Address issue #1538 .
2020-10-05 13:23:25 +03:00
cheatfate
67a93f558b
Address issue #1714 .
2020-10-05 13:22:45 +03:00
Jacek Sieka
99afafecd7
fix quadratic seq assignment in fork choice ( #1805 )
...
this would reallocate the attestation queue on every attestation and
other call to update_time, causing quite the overhead (~10% cpu spent
when gossiping)
2020-10-03 23:43:27 +02:00
Mamy Ratsimbazafy
b57693ec0d
Logging update ( #1795 )
...
* Fix discovery log message trigger
* Bump chronicles - include https://github.com/status-im/nim-chronicles/pull/89 for better NOTICE/WARNING color
2020-10-03 08:35:45 +02:00
tersec
5e95fd7468
Revert "update to v0.12.3 message ID for Spadina launch ( #1762 )" ( #1801 )
...
This reverts commit a2270a5f27
.
2020-10-02 19:50:21 +00:00
Zahary Karadjov
f5340998b9
Add a fuzzing test for the beacon node CLI parser
2020-10-02 12:42:32 +03:00
tersec
ee114deb82
fix #1782 by checking for empty attester index sets ( #1786 )
2020-10-01 21:05:22 +02:00
Mamy Ratsimbazafy
0280d6c73e
Revisiting log levels ( #1788 )
...
* Update log level - https://github.com/status-im/nim-beacon-chain/issues/1779 https://github.com/status-im/nim-beacon-chain/issues/1785
* Address review comments
* Document the logging strategy [skip ci]
2020-10-01 20:56:42 +02:00
tersec
13d4831664
fix #1783 by not assuming that an attached validator will attest ( #1787 )
2020-10-01 14:48:24 +00:00
tersec
7eaaab908c
fix output of proposer slashing test fixture ( #1780 )
...
* fix output of proposer slashing test fixture
* run make test
* a few more v0.12.3 spec refs
2020-09-30 13:12:03 +00:00
Giovanni Petrantoni
0c921b7bc0
Multinet fixes ( #1774 )
...
* add missing hardcoded preset value
* wip
* wip
2020-09-29 10:12:57 +02:00
Kim De Mey
f6b8e26567
Fix typos [skip ci] ( #1771 )
2020-09-28 20:43:09 +02:00
Viktor Kirilov
2e6fd8976a
Ctrl+C now stops the BN when waiting for genesis ( #1761 )
...
* Ctrl+C now stops the BN when waiting for genesis
* proper shutdown when waiting for genesis if Ctrl+C is used
2020-09-28 17:19:57 +02:00
tersec
a2270a5f27
update to v0.12.3 message ID for Spadina launch ( #1762 )
...
* update to v0.12.3 message ID for Spadina launch
* remove base64 import
2020-09-28 17:07:10 +02:00
Kim De Mey
23bec99341
Let also discovery used listen-address cli option instead of always any address ( #1658 )
2020-09-27 22:00:24 +02:00
Jacek Sieka
c472d5368b
avoid attestation pool copy in check ( #1755 )
2020-09-25 19:51:44 +02:00
Mamy Ratsimbazafy
94120ad011
Slash protection fixes ( #1757 )
...
* Address #1698
* Add test for #1699
2020-09-25 19:39:06 +02:00
Jacek Sieka
7837646079
anonymize libp2p messages ( #1756 )
...
* anonymize libp2p messages
* bump
2020-09-25 18:40:30 +02:00
Zahary Karadjov
b6262bfe46
Bugfix: prevent an error during deposit data generation
2020-09-25 17:11:36 +03:00
Eugene Kabanov
1bf8d3af33
Disconnect peers with low score. ( #1747 )
...
* Disconnect peers with low score.
* Change PeerScoreLow value.
* Add spec url for DisconnectionReason.
2020-09-25 15:43:45 +02:00
tersec
f96ad87d28
switch another 50+ spec refs from v0.12.2 to v0.12.3 ( #1749 )
2020-09-25 11:52:50 +00:00
tersec
6cf7e837ce
refactor exit pool and gossipsub-subscribe to exit pool message types ( #1733 )
...
* refactor exit pool and gossipsub-subscribe to all exit pool message types
* remove unused loop counter
2020-09-24 19:05:49 +02:00
tersec
6398a43cc1
update 120+ beacon_chain and validator spec refs from v0.12.2 to v0.12.3 ( #1740 )
2020-09-24 19:04:10 +02:00
Jacek Sieka
b3a9afa0b1
libp2p: limit max gossip writes ( #1739 )
...
* libp2p: limit max gossip writes
* bump
2020-09-24 19:03:17 +02:00
tersec
0eb53f2802
avoid unpacking phase 1 tests to reduce Azure CI disk usage ( #1736 )
2020-09-24 17:16:00 +02:00
Viktor Kirilov
410a72667b
fixed interop with geth after updating nim-web3
2020-09-24 16:07:57 +03:00
Eugene Kabanov
2cd0c3adaa
Fix condition. ( #1734 )
2020-09-24 14:14:29 +02:00
Viktor Kirilov
b9deff43ce
fixed build after rebasing on top of the recently introduced slashing protection
2020-09-24 11:31:14 +03:00