# block · Rell standard library · Chromia Docs (concept)

> type block A test block builder; i.e. a builder for test
blockchain blocks. A test block consists of a list of test transactions that are executed when the

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/

TYPE

# block

```signature
type block
```

A test block builder; i.e. a [builder](https://en.wikipedia.org/wiki/Builder_pattern) for test
blockchain blocks.

A test block consists of a list of test transactions that are executed when the block is built. A
test transaction consists of a list of test operation calls, and a list of signing keypairs.

#### Test block timestamps

The timestamps of Rell test blocks are deterministic, and determined by the following rules:

1. If the next block's timestamp was set explicitly via `rell.test.set_next_block_time()` or
   `rell.test.set_next_block_time_delta()`, that timestamp is used for the next block, and is then
   discarded (and will not be used by subsequent blocks).
2. If the next block's timestamp was not set explicitly, and there is a previous block, the next
   block's timestamp is the timestamp of the previous block plus the block interval
   (`rell.test.block_interval`, which can be set with `rell.test.set_block_interval()`).
3. If the next block's timestamp was not set explicitly, and there is no previous block, the
   timestamp of the next (and first) block will be `2020-01-01 00:00:00 UTC`.

**See Also**

1. [Builder pattern - Wikipedia](https://en.wikipedia.org/wiki/Builder_pattern)
2. [`rell.test.tx` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/tx/)
3. [`rell.test.op` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/op/)
4. [`rell.test.set_next_block_time()` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/set_next_block_time/)
5. [`rell.test.set_next_block_time_delta()` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/set_next_block_time_delta/)
6. [`rell.test.block_interval` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block_interval/)
7. [`rell.test.set_block_interval()` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/set_block_interval/)
8. [`rell.test.block` - Chromia Documentation](https://docs.chromia.com/rell/tests/namespace/block)

Since 0.10.4

## Methods

[block](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/block/)

[copy](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/copy/)
:   Copy this test block builder.

[run](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/run/)
:   Build a test block from this test block builder.

[run\_must\_fail](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/run_must_fail/)
:   Build a test block from this test block builder, asserting that the building fails (i.e. throws

[tx](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/tx/)
:   Add a list of test transactions to this test block builder.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/rell.test/block/index.html)Generated API reference, mirrored from the live docs
