Skip to content

Commit 41bedcd

Browse files
committed
Add a section on testing.
1 parent a69d1ff commit 41bedcd

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

rfcs/0050-genesis-ledger-export.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,26 @@ transferred into a berkeley node, the latter cannot load them, because
148148
Base58check fails to decode them. This is a problem we need to overcome
149149
or decide that we won't export the epoch ledgers and assume they're
150150
the same as the genesis ledger for the purpose of hard fork.
151+
152+
## Testing
153+
154+
An automatic integration test will be written to check that the data is
155+
being exported properly. The procedure is to start a fresh network and
156+
generate a couple of transactions. Then the transactions are stopped.
157+
Finally the ledger export is performed and the test compares the
158+
exported state to the current state of the blockchain as obtained
159+
through GraphQL. These checks must take into account the fact, that
160+
it has changed slightly since the transaction stop (a couple additional
161+
blocks might have been produced). However, all balances should definitely
162+
be the same (after the transaction stop no transactions are allowed, there
163+
are no fees of coinbase rewards anymore).
164+
165+
The procedure can also be tested manually as follows:
166+
* Sync up with the mainnet.
167+
* Export the genesis ledger at any point in time.
168+
* The program mentioned in a previous section can be
169+
used to verify the exported ledger.
170+
* Start a new network with the exported state.
171+
* The new network should be able to produce blocks.
172+
* All the accounts should have the same balances and
173+
delegates as on the mainnet at the moment of export.

0 commit comments

Comments
 (0)