Milo Davis
7fc74da1a2
Data_encoding: add bounded strings and bytes
2018-05-25 14:41:27 +02:00
Grégoire Henry
c2241c034a
Data_encoding: allow smaller size field for Dynamic_size
2018-05-25 14:41:27 +02:00
Grégoire Henry
89b6799fd6
Data_encoding: add combinator for positive big number
2018-05-25 14:41:27 +02:00
michael
3f1363b9ba
P2P/Shell: Split metadata into peer_metadata and conn_metadata
...
Peer_metadata is meant to keep track of peer's score.
Conn_metadata is meant to keep track of connection configuration given
during Ack exchange.
2018-05-25 11:39:22 +02:00
bruno
c13b7dd39a
Alpha: typos
2018-05-25 10:36:08 +02:00
Grégoire Henry
e1622c7b77
Opam: fix test dependencies for data_encoding
.
2018-05-25 00:47:52 +02:00
Raphaël Proust
118188530a
Data_encoding: crowbar tests
...
This work is based on ideas more fully developped in
https://gitlab.com/gasche/fuzz-data-encoding .
However, including some tests directly in this repo helps with CI
integration as well as keeping the tests and interfaces up to date.
Eventually, we should integrate the tests from the fuzz-data-encoding
library.
2018-05-24 17:50:18 +02:00
Raphaël Proust
8b5bce50cf
Data_encoding: test catching of invalid encodings
2018-05-24 17:50:18 +02:00
Raphaël Proust
00d596e9c2
Data_encoding: catching more invalid encoding
2018-05-24 17:50:18 +02:00
Benjamin Canou
b0be5b630d
Data_encoding: Ignore is actually a `Fixed 0
2018-05-24 15:43:15 +00:00
Pietro
d1c2f631d5
Data_encoding: Refresh benchmarks
2018-05-24 15:43:15 +00:00
Grégoire Henry
2b82a588e1
Data_encoding: improve docstrings.
2018-05-24 15:43:15 +00:00
Grégoire Henry
2e9df07b0e
Data_encoding: add check_size
2018-05-24 15:43:15 +00:00
Grégoire Henry
5023e1a261
Data_encoding: rename Binary.to_bytes
into to_bytes_exn
2018-05-24 15:43:15 +00:00
Grégoire Henry
72fc71be67
Data_encoding: rename Binary
into Binary_writer
2018-05-24 15:43:15 +00:00
Grégoire Henry
1da0d0c8d7
Data_encoding: split out Binary_length
2018-05-24 15:43:15 +00:00
Grégoire Henry
aee6718148
Data_encoding: use CPS for the stream reader
2018-05-24 15:43:15 +00:00
Grégoire Henry
b83797371e
Data_encoding: rename Size
into Binary_size
2018-05-24 15:43:15 +00:00
Grégoire Henry
b164dd6cc5
Data_encoding: drop module Assert
...
- drop the quick-and-dirty `Assert` introduced when we switched from
`Kaputt` and use `Alcotest.check` instead.
- split tests in multiple files:
- success.ml
- write_failure.ml
- read_failture.ml
- invalid_encoding.ml
- randomized.ml
2018-05-24 15:43:15 +00:00
Grégoire Henry
a0cae2af57
Data_encoding: enforce fixed-size strings in JSON.
2018-05-24 15:43:15 +00:00
Grégoire Henry
1bc7b45fdb
Data_encoding: forbids nested options
2018-05-24 15:43:15 +00:00
Grégoire Henry
1f358b7f9a
Data_encoding: move cut_bytes
into MBytes
2018-05-24 15:43:15 +00:00
Grégoire Henry
cb28ca1cd5
Stdlib: reintroduce MBytes.pp_hex
2018-05-24 15:43:15 +00:00
Fabrice Le Fessant
8986640a98
P2p: make nonces unpredictable when connecting
...
Avoid replay-attacks by preventing a node from determining one of the
nonces used in the encryption of a channel between two nodes.
2018-05-24 12:11:42 +02:00
Benjamin Canou
dcf27f48d9
Alpha: do not produce multiple revelations
2018-05-22 12:32:47 +02:00
Benjamin Canou
89d9d83b15
Alpha: remove unused error
2018-05-22 12:32:47 +02:00
Grégoire Henry
d0a9fb678c
Alpha: better error for invalid key revelation
2018-05-22 12:32:47 +02:00
OCamlPro-Iguernlala
4caf7cf679
P2p_maintenance: improve 'try_to_contact' and 'connectable'
...
To avoid eventual infinite loops in 'try_to_contact', we
accumulate the set of points that have been seen to discard them
during recursive calls.
2018-05-22 12:20:04 +02:00
Marco Stronati
5a26d23cf7
Crypto: replace nocrypto sha256 with hacl
2018-05-17 10:20:22 +02:00
Marco Stronati
7d6da7179b
Crypto: replace ocaml-tweetnacl with ocaml-hacl
2018-05-17 10:20:22 +02:00
Grégoire Henry
01941fa725
Opam: fix tezos-stdlib.opam
2018-05-13 01:42:05 +02:00
Vincent Bernardoff
abdcfab111
RPC: add CORS test
2018-05-13 00:20:40 +02:00
Vincent Bernardoff
64183bbcf3
RPC: CORS now accepts Content-Type
by default
2018-05-13 00:00:18 +02:00
Vincent Bernardoff
049efb2169
Stdlib/String: add Set module
2018-05-12 23:57:32 +02:00
OCamlPro-Iguernlala
6b8c3f7d31
P2p_maintenance.connectable: ignore non-trusted points if option --closed is set
2018-05-12 23:42:20 +02:00
Vincent Bernardoff
b48ba96106
Stdlib: use bigstring
to implement MBytes
2018-05-12 23:11:35 +02:00
Vincent Bernardoff
1cd82f5d82
Stdlib: do not use deprecated stringext
2018-05-12 23:11:35 +02:00
Benjamin Canou
3ca03f6da7
Alpha: remove dead code for deposit forfeiting
2018-05-11 16:49:16 +02:00
Grégoire Henry
3e6633bacc
Alpha: burn only rewards and fees when baker do not reveal seeds
...
We only forfeit the bond in case of double-baking.
2018-05-11 15:50:03 +02:00
Pierre Chambart
e16cf6d28b
Simplify, bit extraction from Z values
2018-05-09 16:36:52 +00:00
Benjamin Canou
deffa28aa4
Data_encoding: add more compact binary serializer for Z
2018-05-09 16:36:52 +00:00
Benjamin Canou
441149880c
Environemt: add equality for Z.t
2018-05-09 16:36:52 +00:00
Benjamin Canou
636fecb6ff
Utils: add Compare.Z
2018-05-09 16:36:51 +00:00
Raphaël Proust
a3474ae496
Typo in error message
2018-05-09 17:46:54 +02:00
Grégoire Henry
74ec514fd2
Alpha: fail on early revelations
...
We now fail when a nonce is revealed before
the the expected revelation cycle.
2018-05-09 17:46:54 +02:00
Grégoire Henry
3cb1c3c5e2
Alpha: error messages for invalid nonce revelations
2018-05-09 17:46:48 +02:00
Grégoire Henry
43fe4dbdc3
Alpha: minor cosmetic changes
2018-05-09 17:45:37 +02:00
Benjamin Canou
a873930a09
Alpha: minor change to the PoW check
2018-05-09 15:56:09 +02:00
Grégoire Henry
e3bfe0d651
Alpha: exclude signature from the minimal stamp of PoW.
...
We don't want the stamp to be cheaper for people with faster
signing devices...
2018-05-09 15:56:09 +02:00
bruno
6966240a54
Alpha: export missing errors
2018-05-08 12:50:04 +02:00
Benjamin Canou
cd731df938
Add missing opam dependency
2018-05-05 01:29:06 +02:00
Benjamin Canou
294e270f32
Add missing opam dependency
2018-05-04 19:23:04 +02:00
Vincent Bernardoff
96d9f317c1
Ocplib_json_typed: adapt code for inclusion in vendors
2018-05-04 18:48:00 +02:00
Pietro
b27bb84861
[p2p] fix space for semicolon and pipe
2018-05-03 16:03:01 +02:00
Grégoire Henry
fe9c06b7ca
Test: fix test_multinode.sh
2018-05-03 16:03:01 +02:00
Pierre Chambart
137613ee9a
Formatting client_p2p_commands
2018-05-03 16:03:01 +02:00
Pierre Chambart
d71ff759dc
Remove uses of Time.now in P2p_acl
2018-05-03 16:03:01 +02:00
Pierre Chambart
6bdb959204
Really get rid of magic...
2018-05-03 16:03:01 +02:00
Pierre Chambart
7de7043a74
Stdlib: get rid of magic in HashPtree
2018-05-03 16:03:01 +02:00
Pietro
4d9292fcbb
Fix other minor comments
2018-05-03 16:03:01 +02:00
Pietro
c5d41465a2
p2p: temp ban point on invalid auth
2018-05-03 16:03:01 +02:00
Pietro
ce92f70883
P2p: Fix Hashtbl for PeerRing
...
Export hash in INTERNAL_HASH. now Peer_id.Id is hashable
2018-05-03 16:03:01 +02:00
Pietro
3683e948c1
Ring: swap operation order in Ring.Maketable.add
2018-05-03 16:03:01 +02:00
Pietro
511b47148c
p2p, ring: Cleanup PeerId table
2018-05-03 16:03:01 +02:00
Vincent Bernardoff
b3df4e63c8
[P2P] ACLs: cosmetics, renamings, comments
2018-05-03 16:03:01 +02:00
Pietro
02838a4cbc
p2p,node,client: Add Greylists
...
- add admin commands to ban and unban ips and peers
- add greylist_timeout option to configuration file (node)
- Add greylist modules + RPC
2018-05-03 16:03:01 +02:00
Pierre Chambart
496cbe566d
Stdlib: add ephemeron-based patricia trees for P2P greylisting
2018-05-03 15:58:08 +02:00
Vincent Bernardoff
280d88faaf
TLS: add connectivity test
2018-05-03 15:48:25 +02:00
Vincent Bernardoff
7ffad5887d
Node: update issues URL in man page
2018-05-03 15:48:25 +02:00
Vincent Bernardoff
63e44af5e4
TLS: switch to ocaml-tls
2018-05-03 15:48:25 +02:00
Grégoire Henry
0b31ebb455
Data_encoding: split out Binary_stream
2018-05-03 15:35:40 +02:00
Grégoire Henry
c9eab8689a
Shell/Distributed_db: tune requests delay
2018-05-03 11:51:29 +02:00
Grégoire Henry
f2db5ffde3
Shell/Bootstrap: improve network paralellism
2018-05-03 11:51:29 +02:00
Grégoire Henry
6e4b2eab47
Shell: reduce default logging a little bit
2018-05-03 11:51:29 +02:00
Grégoire Henry
caa764f0ff
Data_encoding: do not open the implementation modules by default
2018-05-03 11:05:06 +02:00
Raphaël Proust
0a3c9d52ec
Data_encoding: deduplicate documentation
2018-05-03 15:25:47 +08:00
Raphaël Proust
194d3f9120
Data_encoding: move internal function internally
2018-05-03 15:18:10 +08:00
Raphaël Proust
34d4e9ec5d
Data_encoding: don't open Encoding
2018-05-03 15:13:39 +08:00
Raphaël Proust
1ade54a7d7
Data_encoding: separate Size into its own module
2018-05-03 15:11:46 +08:00
Raphaël Proust
2418554f78
Data_encoding: reorder and reorganize doc
2018-05-03 14:00:24 +08:00
Raphaël Proust
56fbc5267d
Data_encoding: split implementation
...
In an effort to keep a clean commit history, the interface is unchanged.
2018-05-03 12:27:17 +08:00
Milo Davis
7a43c5bc41
P2p_pool: fix ambiguous JSON union case
2018-04-26 22:52:21 +02:00
Milo Davis
ebfdeea8d5
Data_encoding: add descriptions to encodings
2018-04-26 22:52:21 +02:00
Milo Davis
f5cc599ae6
Data_encoding: add names to union cases
2018-04-26 22:52:21 +02:00
Vincent Bernardoff
de006f4be3
Crypto: fix hardcoded signatures in tests
2018-04-26 21:24:21 +02:00
Vincent Bernardoff
54bbc71c1b
Crypto: sign 32 bytes message hash
2018-04-26 21:24:21 +02:00
Vincent Bernardoff
47f9c2460b
Crypto: fixes for secp256k1
2018-04-26 21:24:21 +02:00
Vincent Bernardoff
3a0cdfd90a
Crypto: Secp256k1 -> Libsecp256k1
2018-04-26 21:24:21 +02:00
Raphaël Proust
f8130eed82
Stdlib/MBytes: avoid double raise
2018-04-26 21:22:28 +02:00
Raphaël Proust
1af07b233a
Data_encoding: better documentation of int
2018-04-26 21:20:40 +02:00
Grégoire Henry
02beb9c79a
CI: fix busybox compatibility
2018-04-26 12:55:07 +02:00
Grégoire Henry
0fe8975817
Test: faster testsuite
...
No need to wait 1 second between blocks!
2018-04-22 13:48:20 +02:00
Grégoire Henry
a3a33c4814
Shell: export Signature.Public_key_hash.zero
2018-04-22 13:46:31 +02:00
Grégoire Henry
c3eda23b45
Shell: add a global watcher for new valid blocks in State
2018-04-22 13:46:31 +02:00
Grégoire Henry
3ba30fa468
RPC: allow 'epoch' as a valid Time.rpc_arg
2018-04-22 13:46:31 +02:00
Grégoire Henry
d3f4424c75
RPC: Use bytes
for source files encoding in protocol updates
2018-04-22 13:46:31 +02:00
Grégoire Henry
bc9179094f
Shell: store mainchain and testchain in State
2018-04-22 13:41:26 +02:00
Grégoire Henry
7adc0c90e7
Compiler: preserve Protocol_hash
2018-04-22 13:41:26 +02:00
Grégoire Henry
aeacd845f2
Shell: minor renaming
2018-04-22 13:41:26 +02:00
Grégoire Henry
aa12c6fd9b
Opam: fix alcotest version
2018-04-19 12:02:23 +02:00
Vincent Bernardoff
7c546425d2
Vendors/tweetnacl: use bigstring
2018-04-19 10:31:56 +02:00
Vincent Bernardoff
230d495dc6
Vendors/blake2b: use bigstring
2018-04-19 10:21:01 +02:00
Raphaël Proust
3ceaed4dd3
Crypto: more alcotesty tests
2018-04-18 14:41:44 +02:00
Raphaël Proust
cd8a63f543
Crypto: Only extract checksum when there's one
...
Specifically, check that there are enough characters to extract the 4-characters
checksum of safe-encoded strings.
The commit also introduces new tests for some parts of the crypto library.
2018-04-18 14:41:44 +02:00
Grégoire Henry
40e63739ac
Base58: regroup prefix definition.
2018-04-18 09:53:11 +02:00
Grégoire Henry
11ad8fa8ea
Fix rebase conflict.
...
oups...
2018-04-17 15:24:23 +02:00
Marco Stronati
a491083586
Alpha: added rpc 'proto/delegate/<id>/frozen_balances'
2018-04-17 14:54:51 +02:00
Grégoire Henry
dbe4a20d4a
Reset the chain
2018-04-17 13:46:23 +02:00
Grégoire Henry
b6ed841ccf
Genesis: fix genesis key
...
(was mistakenly changed in 9ffead02d2
)
2018-04-17 13:45:41 +02:00
Grégoire Henry
7429a5b21d
Client: fix wallet import
2018-04-17 10:50:27 +02:00
Grégoire Henry
020ef19460
Client: add a claim operation that activate a commitment account
2018-04-17 10:50:23 +02:00
Grégoire Henry
ec25690166
Client: minor refactoring
2018-04-17 10:39:24 +02:00
Vincent Botbol
326226d5ed
Genesis: add mnemonics, passwords and emails to genesis info generation
2018-04-17 10:36:46 +02:00
Arthur B
eb1dfb7f20
Shell/Alpha: allow usage of secp256k1 for signature
2018-04-16 18:37:52 +02:00
Milo Davis
19843b96b0
Client: use source_param instead of alias_param
2018-04-16 12:38:31 +00:00
Grégoire Henry
3765c39477
Client: fix for issue #161 .
...
Use proper parsing for `--delegate` argument.
2018-04-16 12:38:31 +00:00
Grégoire Henry
3d57055cca
Alpha: use protocol parameters instead of sandbox to tune constants
2018-04-16 09:28:26 +02:00
Grégoire Henry
98f30a3e85
Alpha: allow more constant parametrization
2018-04-16 09:28:26 +02:00
Marco Stronati
0940442148
Alpha: fixed type of Tez for constants
2018-04-12 16:40:42 +02:00
Grégoire Henry
c6ffe4a5d9
Alpha: better threading of fees and rewards
2018-04-10 16:23:53 +00:00
Vincent Bernardoff
401eeceefb
Client: fix error when signing with encrypted keys
2018-04-09 17:14:15 +02:00
Grégoire Henry
ce2d196bb5
Data_encoding: be compatible with 32bits platform.
...
We should not accept for `data_encoding.ranged_int` values that cannot
fits in `int31`. Iw we wnat more, we should introduce `ranged_int32`
or `ranged_int64`.
2018-04-09 13:17:04 +00:00
Marco Stronati
a8beaec40a
Alpha: added a rpc to retrieve all constants at once.
2018-04-09 15:05:46 +02:00
Vincent Botbol
91dfb730bf
Alpha: parametrize protocol activation with commitments and bootstrap accounts
2018-04-09 15:05:46 +02:00
Milo Davis
e6418b4602
Test: minor improvements to test_lib.inc.sh
...
- Can now set show_logs variable from outside the script
- Better logging for assert_balance
- bake_after can now handle quoted arguments
2018-04-08 11:41:37 -04:00
Pietro
80cdf6d0b3
Shell: A bit of randomization for gap in block locators.
...
The random seed is computed from the sender and receiver `peer_id`.
2018-04-07 18:29:02 +02:00
Grégoire Henry
5f69ae87d2
Sandbox: deactivate the minimal stamp of proof of work for bakers
2018-04-06 13:45:13 +02:00
Grégoire Henry
745aabcd22
Script: allow to reinitialize a sandboxed client
...
Running twice the `tezos-init-sandboxed-client.sh` should remove from
the disk the previous client and initialize a new one.
2018-04-06 13:35:09 +02:00
Grégoire Henry
4f2b2f8ece
Alpha: use Base58 for displaying commitment
2018-04-06 11:56:32 +02:00
Grégoire Henry
9ffead02d2
Shell: simplify hash signatures
2018-04-06 11:56:32 +02:00
Arthur B
21efb2dc9d
Jbuilder: update to beta.19.1
2018-04-06 11:47:22 +02:00
Grégoire Henry
b7c2bac8dc
OPAM: fix tezos-crypto.opam
2018-04-06 11:46:09 +02:00
Grégoire Henry
bf32659a6b
Proto/Env: Replace configure_sandbox
by proper init
2018-04-06 11:40:34 +02:00
Grégoire Henry
6f0cc397ae
Shell: move back hash encoders from lib_base
to lib_crypto
2018-04-03 15:21:38 +02:00
Grégoire Henry
08a3cff5a6
Base: rename Cli_entries
into Clic
2018-04-03 15:21:38 +02:00
Milo Davis
4ad127c398
Client: wait for operation inclusion command and RPC
2018-03-30 00:45:22 +02:00
Grégoire Henry
38c7453edf
Shell/RPC: allow /blocks/<hash>~n/...
...
This allows to query the `n`-th predecessor of block `<hash>`.
2018-03-30 00:45:22 +02:00
Mathias Bourgoin
fcdf36acd4
Shell/RPC: remove the fake block /blocks/prevalidation
...
Add a `/mempool/pending_operations`
2018-03-30 00:44:58 +02:00
bruno
c332343cee
Alpha: add one mutez in interface
2018-03-28 09:30:33 +00:00
Vincent Botbol
c2990b4f14
Alpha: replace the faucet by preallocated-contract activation.
2018-03-28 10:36:37 +02:00
Arthur B
f98ed35583
Blake2B: export kmac
function.
2018-03-28 10:29:51 +02:00
Grégoire Henry
afb1e0f260
Proto/Env: remove {Set,Map}.find
...
Also replace all the function raising `Not_found` by their `_opt` version.
2018-03-27 09:59:59 +00:00
Grégoire Henry
48cc2e9928
Proto/Env: rename Set.S
and Map.S
into S.SET
and S.MAP
.
2018-03-27 09:59:59 +00:00
Vincent Botbol
369b6d7988
Fix: sphinx warning about bad reference
2018-03-26 01:04:07 +02:00
Vincent Botbol
d64d448c3c
Fix: typos in rpc block's dynamic argument description
2018-03-26 01:04:07 +02:00
Vincent Botbol
385a600e98
Docs: add error documentation generation
2018-03-26 01:04:07 +02:00
Benjamin Canou
19eb1c2520
Error_monad: change error wrapping to flatten the JSON format
2018-03-26 01:04:07 +02:00
Benjamin Canou
bd3191059b
Data_encoding: make more combinators transparent to is_tup/is_obj
2018-03-24 16:45:29 +01:00
Benjamin Canou
e0a4147b8d
Alpha: add missing error registrations
2018-03-24 16:45:29 +01:00
Benjamin Canou
583563ede0
Remove dead file
2018-03-24 16:45:29 +01:00