Did you miss me last week? If you did, here’s a larger update on the current MRs to make up for it. If you did not, this frog perfectly represents my feelings about that.

Remove Prevalidation Block

When you submit an operation to the Tezos blockchain, that operation is interpreted in a context. The context is just the current state of all contracts/accounts within Tezos, including whether they had been initialized, their storage, their balance, and their manager. This context is usually the state at the head of the blockchain, however the Tezos node previously used a “prevalidation” context as well. The “prevalidation” context included operations that were valid, but had not yet been included in a block. This MR removes the prevalidation functionality from the node and client.

Previously, you could use the prevalidation block to create larger sequences of operations, however Tezos actually has a better answer for this than assuming that a series of initializations/transfers will happen in sequence: macro transactions. If you look at the Tezos block structure, the operations field of a block is a list of lists. This is because you can submit operations in Tezos that sequences. These sequences are included in a block atomically, and the primitive operations they consist of are executed in sequence.

Client: wait for operation inclusion command and RPC

It’s sometimes important to wait to see if an operation has been included in the blockchain without resorting to using a block explorer. To this end, there are a few new RPCs and a new command that allow you to have the block explorer wait for a specified number of confirmations after your operation has been included in a block.

Tests add context

This MR is part of the ongoing effort to add more tests to Tezos. It adds new functionality to the incremental type, which can be used to build blocks one piece at a time during tests.

Proto/Env: replace `configuresandbox` by proper `init` function

The largest change made in this MR is to change how the node is initialized. Previously, there was a configure_sandbox function, which deactivated the external p2p layer and made certain changes to the way the node worked, which stopped it from broadcasting your changes to the network. This mode still exists, but it has been folded into the init code for the node. This has also changed how some of the data handling works.

This MR does a few additional things.

It updates Jbuilder to beta 19.1.

It adds a script to generate the prefixes for base58 encodings. The tz1 and TZ1 are not coincidental. There were magic numbers found that, when added, give nice hashes. This script helps automate the process of finding these numbers.

It refactors the Ed25519 module, moving some things into new submodules.

Node,State,Chain: Randomize compute locator

When two nodes sync, they exchange locator information. This information is a sequence of block hashes, which they use to determine what data they need and what data they already have. This change adds randomness to decide what data is exchanged. The randomness is deterministic based on the function’s arguments, so though two different other nodes may receive different information, this function can be tested.

Test: minor improvements to testlib.inc.sh

This MR is super minor, but I’m going to talk about it because the script it modifies is useful if you want to write tests for Michelson contracts. Let’s say that you’re writing a contract that’s going to store a bunch of your money. You should definitely write tests, like a lot of them. This script provides a nice way of launching a node, and a variety of bash procedures that let you write testing scripts. So, if you’re writing Michelson test scripts, consider using these primitives.

Dataencoding: be compatible with 32bits platform.

This MR makes the Data_encoding library work on 32 bit platforms. It adds types like the uint30 , which is a 30 bit unsigned integer. This type is useful because OCaml uses 31 bit integers on 32 bit platforms, which can't represent unsigned integers greater than 30 bits. This type is useful if you want to guarantee that a number will be unsigned. This changes some of the ways that the ranged integers work. They will no longer support ranges greater than the 31 bit integer range.

Alpha/Tests: constants

This MR changes how non-context-based constants are stored. It also adds a convenient RPC to get those values.

Client: fix error when signing with encrypted keys

This MR stops an error from occurring when using encrypted keys. This error had to do with how keys are referenced once they are stored.