Commit Graph

216 Commits

Author SHA1 Message Date
Grégoire Henry
670249f580 Alpha: remove constant first_free_baking_slot 2018-06-06 10:54:33 +02:00
Milo Davis
0a88f1887c Data_encoding: binary description printing 2018-06-06 10:54:33 +02:00
Grégoire Henry
632144b689 RPC: remove subfield accessors
This is painful to maintain and `jq` works well.
2018-06-06 10:54:33 +02:00
Raphaël Proust
025187da2f Data_encoding/Json: use strings for all int64
See Issue #190
2018-06-06 10:54:33 +02:00
Grégoire Henry
ceddb09ea7 TMP remove dictator 2018-06-06 10:54:33 +02:00
Grégoire Henry
420986b45b Alpha: simplify the operation datatype 2018-06-06 10:54:33 +02:00
Grégoire Henry
33c3d1fcbd Alpha/RPC: add a low-level but typed RPC for context introspection
Example:

```
> tezos-client rpc get /chains/main/blocks/head/context/raw/json/\?depth\=1 | jq
{
  "commitments": [],
  "contracts": {
    "global_counter": 0,
    "index": []
  },
  "cycle": [
    4,
    3,
    2,
    1,
    0
  ],
  "delegates": [
    "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN",
    "tz1faswCTDciRzE4oJ9jn2Vm2dvjeyA9fUzU",
    "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv",
    "tz1b7tUupMgCNw2cCLpKTkSD1NZzB5TkP2sv",
    "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx"
  ],
  "last_block_priority": 0,
  "rolls": {
    "index": [],
    "next": 2000,
    "owner": {}
  },
  "votes": {
    "ballots": [],
    "current_period_kind": "proposal",
    "current_quorum": 8000,
    "listings": [],
    "proposals": []
  }
}
> tezos-client rpc get /chains/main/blocks/head/context/raw/json/cycle/4\?depth\=2 | jq
{
  "last_roll": [
    [
      0,
      2000
    ]
  ],
  "nonces": [],
  "random_seed": "97d50852c159ada8e9f107e98f693b059ba28336c723e6cd0f6353eb3c0cb415",
  "roll_snapshot": 0
}
> tezos-client rpc get /chains/main/blocks/head/context/raw/json/cycle/5\?depth\=2 | jq
{
  "last_roll": [
    [
      1,
      2000
    ],
    [
      0,
      2000
    ]
  ],
  "nonces": [],
  "roll_snapshot": 2
}
```
2018-06-06 10:54:33 +02:00
Grégoire Henry
64c464a73f Shell/RPC: some module renaming/aliasing 2018-06-06 10:54:33 +02:00
Grégoire Henry
2a93a336aa Shell/RPC: use query parameters in /injection 2018-06-06 10:54:33 +02:00
Grégoire Henry
04c920df29 Shell/RPC: use query parameters in /protocols 2018-06-06 10:54:33 +02:00
Grégoire Henry
acc76d22a8 Alpha/Client: use block metadata 2018-06-06 10:54:33 +02:00
Grégoire Henry
d6f79edae2 Shell/RPC: rework /blocks
- start using `GET` and query parameters instead of `POST`  when
  meaningful

- inline parsed protocol data and metadata in block headers

- inline parsed protocol data and metadata in operations

- split the RPC in four categories:

  - static data, available explicitly in block headers and operations

  - static "metadata", information that were computed while validating
    a block or an operation, but which are not explicit in the block
    header (e.g. the baker of a block, the list of internal
    transfer... (currently not implemented, but that's WIP))

  - "context" all the static data we may read in the context
    (contracts balance, list of delegates, ...)

  - "helpers" are some RPC that may perform some computation.
2018-06-06 10:54:33 +02:00
Pierre Boutillier
e1cdd69b8b MacOS compatible 'date' format (again) 2018-06-06 09:55:56 +02:00
michael
bd3a9fabe5 test: add a small test for disable_mempool option 2018-06-04 15:55:43 +02:00
Grégoire Henry
367cc4e916 Faucet: rename secret into activation_code 2018-06-04 14:40:10 +02:00
Vincent Botbol
92bb69e744 Protocol: remove half pkh in commitments 2018-06-04 14:12:01 +02:00
Grégoire Henry
fc26022cd2 Proto: associate metadata to valid block headers and operations 2018-06-01 16:20:10 +02:00
Grégoire Henry
c85e27605b Proto: export Data_encoding.t for block headers and operationss
Previously we were only exporting parsing function. This will allow
to move out of the protocol some `helpers` RPCs.
2018-06-01 16:20:10 +02:00
Pierre Boutillier
d9c5549ae2 date --"an hour ago" in a way compatible with both GNU and BSD 2018-05-30 12:59:59 +02:00
Grégoire Henry
556e95cef0 Client: rename rpc call into rpc post or rpc get 2018-05-29 16:13:30 +02:00
Benjamin Canou
1b91d0929a Michelson: read some constants in base58 but store them in binary 2018-05-28 17:09:03 +02:00
Benjamin Canou
439435bd11 Michelson: forbid internal operation replay 2018-05-28 17:09:03 +02:00
Benjamin Canou
702896f420 Michelson: switch string tez constants to int mutez constants 2018-05-28 17:09:03 +02:00
Benjamin Canou
a425b3dc27 Michelson: cleanup iterator opcodes 2018-05-28 17:09:03 +02:00
Benjamin Canou
530427c813 Michelson: unpair input of CHECK_SIGNATURE 2018-05-28 17:09:03 +02:00
Grégoire Henry
ee5373d960 Client: add global option --wait 2018-05-28 17:09:03 +02:00
Benjamin Canou
a11e0000e7 Michelson: add SET_DELEGATE opcode 2018-05-28 17:09:03 +02:00
Benjamin Canou
af5a8939cf Alpha: originations from contracts are now internal operations 2018-05-28 17:09:03 +02:00
Benjamin Canou
f05b02f74f Michelson: some new contracts/tests 2018-05-28 17:09:03 +02:00
Benjamin Canou
3cc88d0d81 Docs: update Michelson spec to the new address type 2018-05-28 17:09:03 +02:00
Benjamin Canou
46efb6f3b3 Docs: update Michelson spec to the new semantics 2018-05-28 17:09:03 +02:00
Benjamin Canou
595685cf42 Michelson: replace direct transfers with an internal operation queue 2018-05-28 17:09:03 +02:00
Benjamin Canou
676a64b81f Michelson: rename DEFAULT_ACCOUNT to IMPLICIT_ACCOUNT 2018-05-28 17:09:03 +02:00
Benjamin Canou
c3cf4dfbfb Alpha, Michelson: add gas limits for block and operations 2018-05-28 17:09:03 +02:00
Benjamin Canou
4fd2b03832 Alpha, Michelson: thread the gas directly in the context 2018-05-28 17:09:03 +02:00
Milo Davis
8a49bf5509 Alpha, Michelson: gas in typechecking 2018-05-28 17:09:03 +02:00
Grégoire Henry
0d8990887c Jbuilder: fix the target @runtest_indent 2018-05-26 20:08:03 +02:00
Grégoire Henry
fd72b47263 Opam: fix dependencies 2018-05-26 18:36:32 +02:00
Grégoire Henry
f69d4a5186 Client: simplify Client_keys.SIGNER
We now use `Uri.t` to represent public and secret keys. The 'remote'
scheme is replaced by `https://`, `unix:///` and `tcp://`.
2018-05-26 15:34:16 +02:00
Grégoire Henry
502017c863 Signer: create packages tezos-signer-services and tezos-signed-backends 2018-05-26 15:08:13 +02:00
Grégoire Henry
ad9f4c2814 Signer: move main_signer.ml into into its own package 2018-05-26 15:06:10 +02:00
Grégoire Henry
664f36a46a Client: less restrictive type for Client_keys_commands.commands 2018-05-26 15:05:26 +02:00
Benjamin Canou
0a6f65263f Signer: add HTTPS variant 2018-05-26 15:05:14 +02:00
Benjamin Canou
51cfa388f8 Signer: various fixes and cosmetic changes 2018-05-25 17:18:41 +02:00
Pietro
73b7fc89a5 Client: introduce tezos-signer 2018-05-25 17:18:41 +02:00
Milo Davis
f3b0b0b00a Micheline: add 255 character annotation length limit 2018-05-25 14:41:27 +02:00
Vincent Bernardoff
abdcfab111 RPC: add CORS test 2018-05-13 00:20:40 +02:00
Grégoire Henry
fe9c06b7ca Test: fix test_multinode.sh 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
Vincent Bernardoff
280d88faaf TLS: add connectivity test 2018-05-03 15:48:25 +02:00
Vincent Bernardoff
de006f4be3 Crypto: fix hardcoded signatures in tests 2018-04-26 21:24:21 +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
020ef19460 Client: add a claim operation that activate a commitment account 2018-04-17 10:50:23 +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
Grégoire Henry
3d57055cca Alpha: use protocol parameters instead of sandbox to tune constants 2018-04-16 09:28:26 +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
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
Arthur B
21efb2dc9d Jbuilder: update to beta.19.1 2018-04-06 11:47:22 +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
08a3cff5a6 Base: rename Cli_entries into Clic 2018-04-03 15:21:38 +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
Vincent Botbol
c2990b4f14 Alpha: replace the faucet by preallocated-contract activation. 2018-03-28 10:36:37 +02:00
Pietro
5399dee5ce test: add tezos-alpha-baker command in tezos-init-sandboxed-client 2018-03-22 13:51:26 +01:00
Pietro
9ef69b4502 Client, test: Add two more protocol injection tests (from alpha) 2018-03-20 07:07:57 +01:00
Pietro
c6c9117c3a Client,test: add test for demo protocol activation 2018-03-20 07:07:56 +01:00
Pietro
01dd7d152a Client: better error messages for unwrapped JSON objects. 2018-03-20 06:50:39 +01:00
bruno
bdf6a5e564 General: update jbuilder to 1.0+beta19 2018-03-20 06:49:52 +01:00
Benjamin Canou
19d9ce1f64 Alpha: fix tests 2018-03-18 18:11:04 +01:00
Grégoire Henry
0283bee65b Alpha: add constant 'block_per_roll_snapshot' 2018-03-15 23:40:46 +01:00
Grégoire Henry
4e9fd509b3 Proto: export the 'last_allowed_fork_level'.
The should ignore all branch forking at a block whose level
is lower than the 'last_allowed_fork_level' of the current head.
2018-03-15 21:48:16 +01:00
Grégoire Henry
76a59af376 Opam: use jbuilder.1.0.0-beta18 2018-03-08 14:38:57 +01:00
Grégoire Henry
ad330db7e1 Opam: require jbuilder = 1.0.0-beta17 2018-03-07 18:12:12 +01:00
Grégoire Henry
38f46d832a Alpha/client: add a command for registering as delegate 2018-02-28 14:59:01 +01:00
Grégoire Henry
59d69c8fb1 Test: fix sandboxed scripts. 2018-02-28 14:48:47 +01:00
Marco Stronati
ce93c266e5 Client: added bash test for raw_context rpc call 2018-02-23 15:09:45 +00:00
Vincent Botbol
b78d7bdaee Repair: fix sandbox initialization script 2018-02-21 18:34:55 +01:00
Grégoire Henry
0e79a65158 Shell: rename Block_header.proto/data into protocol_data 2018-02-18 17:11:13 +00:00
Benjamin Canou
bb0fa86d91 Client: rename client context classes for clarity 2018-02-16 18:12:29 +01:00
Grégoire Henry
6fa1283240 Shell: Rename net_id into chain_id 2018-02-16 02:57:25 +01:00
Benjamin Canou
e2be3360a9 Client: split client-alpha into lib and commands and extract the baker 2018-02-15 22:54:39 +01:00
Benjamin Canou
a1984ee090 Client: fix minor display glitches 2018-02-15 19:59:50 +01:00
Benjamin Canou
dd1b200306 Client: split client-base into client-base and client-commands 2018-02-15 19:59:50 +01:00
Benjamin Canou
7e6a4a5333 Client: minor refactoring 2018-02-15 18:21:18 +01:00
Benjamin Canou
345bbc715d Client: move protocol injection commands to the admin client 2018-02-15 18:21:18 +01:00
Benjamin Canou
bacb55800d Client: split Client_commands into Client_commands and Client_context 2018-02-15 18:21:18 +01:00
Benjamin Canou
cafcaf925b Client: cleanup admin commands 2018-02-15 18:21:18 +01:00
Benjamin Canou
a14616517e Client: split client-base modules into functions / commands 2018-02-15 18:21:18 +01:00
Benjamin Canou
b3066d6a24 Client: remove Unix dependencies from client-base and client-alpha 2018-02-15 18:21:15 +01:00
Benjamin Canou
42566e9dcd Client: move Unix out of Cli_entries and a bit of output cleanup 2018-02-15 18:20:42 +01:00
Pietro
c67e6d4b04 Client/test: Add shell script to test protocol injection 2018-02-14 11:48:33 +01:00
Grégoire Henry
83307c6de0 Client: more open #full_context 2018-02-12 16:54:08 +01:00
Grégoire Henry
0bd31b0c38 Client refactor: remove last bits of lib_client_base/client_rpcs.ml
Split between `lib_rpc_http/RPC_client` and
`lib_shell_services/Block_services`.
2018-02-12 16:54:08 +01:00
Grégoire Henry
f6b55fa46d Test: fix manual execution of ./test-basic.sh 2018-02-11 19:17:38 +01:00
Grégoire Henry
02c2035e93 Client refactor: Move Client_node_rpcs.Block into Block_services 2018-02-08 17:23:30 +01:00
Grégoire Henry
acffadafae Jbuilder: fix warning 2018-02-07 11:16:39 +01:00
Vincent Bernardoff
e1d1292c09 Crypto: drop libsodium
We now use simpler OCaml bindings much easier to review.
2018-02-07 11:16:39 +01:00
Benjamin Canou
8bec8b7b9c Michelson: add isolate test for big maps 2018-02-06 17:04:49 +01:00
Benjamin Canou
5ae24aa7a3 Scripts: repair tezos-autocomplete, and make it work with emacs and zsh 2018-02-06 17:04:49 +01:00
Milo Davis
79472c727a Michelson: introducing big maps, limited edition
Quick and dirty (yet safe, of course) implementation of lazily
  deserialized maps for storing large collections of indexed data.

  Only one big_map is allowed, as the left component of the toplevel
  storage pair.

  Review and bugfixes: Benjamin Canou <benjamin@canou.fr>
2018-02-06 17:00:54 +01:00
Grégoire Henry
575e367026 Update copyright notice (2018) 2018-02-05 23:34:05 +01:00
Grégoire Henry
e28219ad60 Opam: update to jbuilder.1.0+beta17 2018-02-05 23:34:05 +01:00
Grégoire Henry
0166f2325e Test: move test into src/bin_client/test 2018-02-05 23:34:05 +01:00
Grégoire Henry
ae3ff0503b Proto: the number of validation is now a protocol constant 2018-02-02 10:27:58 +01:00
Vincent Bernardoff
4ffb00ffde Client: segregate signing 2018-02-01 23:16:13 +01:00
Grégoire Henry
70a4fbac3a Refactor: rename package tezos-embedded-client-* -> tezos-client-* 2018-01-30 10:13:40 +01:00
Grégoire Henry
6e629584ff Jbuilder: fix rule runtest_indent 2018-01-27 11:32:57 +01:00
Milo Davis
545cd0c869 Client: commands to update config file 2018-01-25 23:22:59 +01:00
Milo Davis
937869da43 Client: split admin/debug commands into separate executable 2018-01-25 15:57:20 +00:00
Grégoire Henry
bfb2d223c0 opam: fix sandboxed scripts 2018-01-22 09:20:46 +01:00
Grégoire Henry
525b09259f Fix d9405292a4 2018-01-18 16:08:20 +01:00
Vincent Bernardoff
e6f773f697 Base58: encode secret keys as seed 2018-01-18 10:45:47 +01:00
Pietro
d9405292a4 Move all packages to src/
Modify Makefile accordingly
2018-01-16 23:11:39 +01:00