Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
7fc110c
Lib_validator/Lib_shell: Better handshake
vect0r-vicall Nov 29, 2019
98ca76e
Bin_validation: minor refactoring
vect0r-vicall Dec 10, 2019
e207ac0
Shell/Validation: external validation through socket
vect0r-vicall Nov 29, 2019
08f1b19
Bin_node: re-write to_ipv4 function
vect0r-vicall Jan 9, 2020
e129c6e
Bin_node: add logging events
vect0r-vicall Jun 12, 2020
066016a
fixup: Shell/Validation: external validation through socket
vect0r-vicall Jul 8, 2020
bf3ee32
Stdlib: provide signal_of_string for better UX
Jul 15, 2020
3bfe15d
Shell/Validation: allow the validator to be standalone
Jul 15, 2020
ab2d881
Client/mockup: remove --chain-id-seed arg in create mockup command
Jun 30, 2020
d50596a
Tests/python: remove mockup --chain-id-seed test
smelc Jul 1, 2020
fb99053
doc: update and add example to mockup mode documentation
Jul 6, 2020
8ccd470
p2p: marginally more memory efficient state_info point
abate Jun 21, 2020
1c73688
p2p: change greylisting info in points RPC state
abate Jun 21, 2020
484f3c9
p2p: rename greylisting_config into reconnection_config
abate Jun 22, 2020
7208962
p2p: rename greylisted_until to reconnection_time
abate Jun 22, 2020
e28ea01
P2p: minor doc fix
Jul 17, 2020
41fc1bb
Everywhere: update Nomadic Labs' email contact in license headers
raphael-proust Jul 17, 2020
0ac639e
Tests/python: do not give -base-dir twice
smelc Jun 10, 2020
38c4663
Tests/python: simplify mockup client tests
smelc Jun 11, 2020
64b16e0
Tests/python: benign code sharing
smelc Jun 11, 2020
41413be
Tests/python: Use an enum instead of strings in CreateMockup
smelc Jul 15, 2020
cbe2944
Tests/python: mockup: tests both alpha and carthage
smelc Jul 16, 2020
7e3ebe4
Tests/python: make carthage tests pass
smelc Jul 16, 2020
d8dc723
Stdlib_unix/lwt_exit: complete rewrite
raphael-proust Jun 8, 2020
adf08c6
CI: update unix test
raphael-proust Jun 10, 2020
df7e06f
Stdlib_unix: let user decide soft/hard signal handling policy
raphael-proust Jun 11, 2020
b55cecb
Stdlib_unix: add `after` parameter to `Lwt_exit.register`
raphael-proust Jun 15, 2020
45dce8f
Stdlib_unix: handle sigterm softly by default in Lwt_exit
raphael-proust Jun 26, 2020
378a498
Stdlib_unix: wait before activating "double soft is hard"
raphael-proust Jul 1, 2020
77dbf02
Stdlib_unix/Lwtresult: require loc when registering
raphael-proust Jul 1, 2020
046aa61
Everywhere: adapt to new Lwt_exit
raphael-proust Jun 11, 2020
ad21d9a
Lwt_exit: test callback unregistration
raphael-proust Jul 21, 2020
7855c0e
Lwt_exit: test interaction of unregistration and after
raphael-proust Jul 21, 2020
eb511ad
Lwt_exit: be more permissive re: after and unregistration
raphael-proust Jul 21, 2020
6cbe7c1
Lwt_exit: more tests, specifically for exception handling
raphael-proust Jul 21, 2020
410e4b5
Lwt_exit: test with double_signal_safety set to zero
raphael-proust Jul 21, 2020
698523e
Lwt_exit: test max_clean_up_time
raphael-proust Jul 21, 2020
6c967df
Changelog: add version 7.3 changes
Jul 22, 2020
dde9e1d
Doc: add documentation for 7.3 release
Jul 22, 2020
05df266
Version: set version to 7.3+dev
Jul 22, 2020
bad4164
Tezt: do not use IPv6 for --net-addr
Jul 22, 2020
6b121e6
P2p: fewer errors when handling peer-advertisement sets
raphael-proust Jul 8, 2020
98cbf36
P2p: fix incoming count
picojulien Jul 9, 2020
e6ae13d
p2p: remove legacy logging from io_scheduler
abate Jul 22, 2020
73482b7
p2p: use int31 everywhere for events
abate Jul 23, 2020
575d720
Lib_p2p/tests: tracking detached function results
picojulien Apr 23, 2020
44eb22e
Lib_p2p/test: remove nested Lwt_main.run in detached process
picojulien Jun 11, 2020
7dfdaf4
Lib_p2p: improving debug messages
picojulien Jun 29, 2020
9174e74
Proto_compiler: turn all protocol warnings into errors
tzemanovic Jul 21, 2020
33e1392
Base: fix ocamldoc for network_version.mli
Jul 23, 2020
4ab199c
Doc: update ledger setup command
paracetamolo Jul 27, 2020
2c5d199
client/mockup: Add configurable initial timestamp
Jul 21, 2020
cb7885a
client/mockup: fix output of mockup constants
Jul 21, 2020
0917e16
Baker patch
icristescu Jul 27, 2020
8df8b5b
small concurrency fix
Jun 1, 2020
2bdd1c7
patched baker: exit properly when no more blocks to read
Jun 3, 2020
e3768c4
Instructions to benchmark node
icristescu May 30, 2020
d31b6f4
Update context
icristescu Jul 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ unit:crypto:
script:
- dune build @src/lib_crypto/runtest

unit:stdlib_unix:
<<: *test_definition
script:
- dune build @src/lib_stdlib_unix/runtest

unit:protocol_environment:
<<: *test_definition
script:
Expand All @@ -133,6 +138,11 @@ unit:shell:
script:
- dune build @src/lib_shell/runtest

unit:protocol_compiler:
<<: *test_definition
script:
- dune build @src/lib_protocol_compiler/runtest

unit:src/bin_client:
<<: *test_definition
script:
Expand Down
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Version 7.3

- Fixed a case where the number of open file descriptors was not correctly limited.
This could result in the node crashing due to being out of file descriptors.

- Set a limit to the length of some incoming messages which previously did not have one.

- Fixed some value encodings which were missing cases.

# Version 7.2

- Fixed an error that could cause baking to fail when validating some smart contracts.
Expand Down
1 change: 1 addition & 0 deletions docs/doc_gen/node_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ let with_node f =
user_activated_upgrades = [];
user_activated_protocol_overrides = [];
patch_context = None;
data_dir = dir;
store_root = dir / "store";
context_root = dir / "context";
protocol_root = dir / "protocol";
Expand Down
24 changes: 18 additions & 6 deletions docs/releases/version-7.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _version-7:

Version 7.2
Version 7.3
===========

Version 7.0 notably introduces the multinetwork node.
Expand All @@ -12,18 +12,20 @@ Version 7.2 fixes an issue that could cause baking to fail when validating some
smart contracts, and fixes how arguments are passed by the tezos-docker-manager.sh
script when using Docker images.

Version 7.3 fixes a couple of security issues.

Update Instructions
-------------------

To update from sources::

git fetch
git checkout v7.2
git checkout v7.3
make build-deps
eval $(opam env)
make

If you are using Docker instead, use the ``v7.2`` Docker images of Tezos.
If you are using Docker instead, use the ``v7.3`` Docker images of Tezos.

New Versioning Scheme
---------------------
Expand All @@ -44,7 +46,7 @@ Additionnally, we provide a ``latest-release`` branch which will always
be equal to the latest release. Release candidates are not considered
to be releases in this sense, so ``latest-release`` will never
point to a release candidate. In other words, ``latest-release`` points
to the latest stable release. Currently, it thus points to version 7.2.
to the latest stable release. Currently, it thus points to version 7.3.

If you are used to the ``mainnet`` and ``mainnet-staging`` branches,
you can consider release candidates to be the new ``mainnet-staging``
Expand All @@ -54,8 +56,8 @@ branch.
Note for Remote Signer Users
----------------------------

Note for users of ``tezos-signer``: the 7.0 (or 7.1, or 7.2) client, baker, endorser
and accuser need the 7.0 signer (or 7.1, or 7.2) to work. They are in particular not
Note for users of ``tezos-signer``: the 7.0 (or above) client, baker, endorser
and accuser need the 7.0 signer (or above) to work. They are in particular not
compatible with the ``mainnet`` version of ``tezos-signer``. So remember to
update your remote signer too!

Expand All @@ -77,6 +79,16 @@ this script has been renamed ``tezos-docker-manager.sh``. The ``alphanet.sh``
script is still available in the Docker image for the auto-update mechanism.
See :ref:`howtoget` for more information.

Changelog — Version 7.3
-----------------------

- Fixed a case where the number of open file descriptors was not correctly limited.
This could result in the node crashing due to being out of file descriptors.

- Set a limit to the length of some incoming messages which previously did not have one.

- Fixed some value encodings which were missing cases.

Changelog — Version 7.2
-----------------------

Expand Down
26 changes: 9 additions & 17 deletions docs/user/key-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,19 @@ Tezos Wallet app
~~~~~~~~~~~~~~~~

Now on the client we can import the keys (make sure the device is
in the Tezos Wallet app):

::
in the Tezos Wallet app)::

./tezos-client list connected ledgers

You can follow the instructions to import the ledger private key and
you can choose between the root or a derived address.
We can confirm the addition by listing known addresses.

::
We can confirm the addition by listing known addresses::

./tezos-client import secret key my_ledger ledger://tz1XXXXXXXXXX
./tezos-client list known addresses

Optional: we can check that our ledger signs correctly using the
following command and confirming on the device:

::
following command and confirming on the device::

tezos-client show ledger path ledger://tz1XXXXXXXXXX

Expand All @@ -72,13 +66,13 @@ only to bake for increasing levels.
This prevents signing blocks at levels below the latest
block signed.

If you have tried the app on some network (Zeronet, Mainnet,...) and want to use it on another
network you might need to reset this level with the command:

::
If you have tried the app on some network (Zeronet, Mainnet,...) and want to
use it on another network you might need to reset this level with the command::

tezos-client set ledger high watermark for ledger://tz1XXXXXXXXXX to 0
tezos-client setup ledger to bake for my_ledger

More details can be found on the `Tezos Ledger app
<https://github.com/obsidiansystems/ledger-app-tezos>`_.

.. _signer:

Expand Down Expand Up @@ -195,8 +189,6 @@ We strongly advice you to first **make a backup** and then
transfer your tokens to a new pair of keys imported from a ledger (see
:ref:`ledger`).

Check the balance with:

::
Check the balance with::

tezos-client get balance for alice
43 changes: 33 additions & 10 deletions docs/user/mockup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,44 @@ You can now edit the files ``bootstrap-accounts.json`` and
--protocol-constants protocol-constants.json \
--bootstrap-accounts bootstrap-accounts.json

Setting protocol constants for the mockup mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Let's look at the contents of the ``protocol-constants.json`` file as produced
by the ``config init mockup`` of ``config show mockup`` commands. The following
was generated using the Carthage protocol:

.. code-block:: JSON

{ "hard_gas_limit_per_operation": "1040000",
"hard_gas_limit_per_block": "10400000",
"hard_storage_limit_per_operation": "60000",
"cost_per_byte": "1000",
"chain_id": "NetXynUjJNZm7wi",
"initial_timestamp": "1970-01-01T00:00:00Z" }

By modifying the two first fields, a user can easily create a mockup environment
with bumped up (or down) gas limits and storage limit. A invariant should be
that the gas limit per block should be greater or equal to the gas limit per
operation. The ``cost_per_byte`` is used to compute the amount of tokens to be
burnt proportionally to the fresh storage consumed by the execution of an
operation. The ``chain_id`` is used to prevent replay of operations between
chains. You can pick a chain id for your mockup environment using the following
command:

Chain id
~~~~~~~~
::

The `chain id` is one particular chain parameter that is also accessible from
the command line at mockup creation.
$ tezos-client compute chain id from seed <string>

For that, you need to use the `chain-id-seed` command-line switch, which will in
turn initialize a valid `chain id`. The mockup creation command now becomes
For instance, the following command:

::

tezos-client --protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK \
--base-dir /tmp/mockup create mockup --chain-id-seed myseed
$ tezos-client compute chain id from seed strudel

yields the chain id ``NetXwWbjfCqBTLV``.


Among the response output to this command, there is a valid chain id
`Chain id is NetXi1dwBfm6F4Y` initialized from your input.
The last field, ``initial_timestamp``, is the creation time of the first block
of the chain. This date string follows the ISO-8601 standard format, which be
generated by `date --iso-8601=seconds`.
14 changes: 14 additions & 0 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This is a mirror of vbot@bench_context on nomadic's remote.
Here are the instructions :

- Retrieve the data-dirs located at `data/ioana` on comanche ({full,archive}_store_BLAktkWruUqXNgHAiR7kLh4dMP96mGmQANDGagdHAsTXfqgvfiR_933914.tar.gz) and their md5 checks;
- Also, copy the blocks you'll validate locally using the patched baker (/data/ioana/blocks_above_933913 on comanche);
- Extract the data-dir somewhere, this will be your bench's initial state;
- Checkout vbot@bench_context on nomadic's remote;
- Generate a p2p identity in the data-dir: `./tezos-node identity generate --data-dir <data-dir>` (this can be your real "ready-to-use" initial state backup);
- Start a node with no connections : `./tezos-node run --rpc-addr :8732 --no-bootstrap-peers --connections 0 --data-dir <data-dir>`;
- Start the baker : `./tezos-baker-006-PsCARTHA run with local node <data-dir> <path_to/blocks_above_933913>`.

This should simulate 2 RO (node + baker) and 1 RW (validator process) allowing you to bench. I also logged in the baker the time spent trying to validate the next block.

A short explanation of the fake baker: instead of producing blocks out of the blue, the fake baker reads already produced blocks on mainnet (in the provided file), try to simulate the operations as it would have done if it was normally producing blocks (thus using the RO instance), and inject it to the node that will also validate it in its RW instance.
6 changes: 1 addition & 5 deletions src/bin_client/main_admin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,4 @@ let select_commands _ _ =
Client_rpc_commands.commands;
Client_event_logging_commands.commands () ])

let () =
Client_main_run.run
~log:(Log.fatal_error "%s")
(module Client_config)
~select_commands
let () = Client_main_run.run (module Client_config) ~select_commands
6 changes: 1 addition & 5 deletions src/bin_client/main_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,4 @@ let select_commands ctxt {chain; block; protocol; _} =
@ Mockup_commands.commands ()
@ commands_for_version

let () =
Client_main_run.run
~log:(Log.fatal_error "%s")
(module Client_config)
~select_commands
let () = Client_main_run.run (module Client_config) ~select_commands
20 changes: 14 additions & 6 deletions src/bin_node/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ let () =
prerr_endline "Non-64 bit architectures are not supported." ;
exit 1 )

let () =
let log s = Node_logging.fatal_error "%s" s in
Lwt_exit.exit_on ~log Sys.sigint ;
Lwt_exit.exit_on ~log Sys.sigterm

let () =
if Filename.basename Sys.argv.(0) = Updater.compiler_name then (
try
Expand All @@ -48,7 +43,20 @@ let () =

let () =
if Filename.basename Sys.argv.(0) = "tezos-validator" then (
try Stdlib.exit (Lwt_main.run @@ Validator.main ())
try
let is_valid_directory =
Array.length Sys.argv = 3
&& Sys.argv.(1) = "--socket-dir"
&& Sys.file_exists Sys.argv.(2)
&& Sys.is_directory Sys.argv.(2)
in
if not is_valid_directory then
invalid_arg
"Invalid arguments provided for the validator: expected \
'tezos-validator --socket-dir <dir>'." ;
Stdlib.exit
( Lwt_main.run @@ Lwt_exit.wrap_and_forward
@@ Validator.main ~socket_dir:Sys.argv.(2) () )
with exn ->
Format.eprintf "%a\n%!" Opterrors.report_error exn ;
Stdlib.exit 1 )
Expand Down
Loading