Alpha/Baker: improve encoding of events

If one needs to inspect the JSON encoding of baker events, then one needs a bit more details. See for instance this encoding

[13:51:38.002] [baker-proto-Mumbai-on-node1] Received event: step_current_phase.v0 = {
[13:51:38.002]   "phase": {},
[13:51:38.002]   "event": 1
[13:51:38.002] }

After this MR it looks like this:

[13:51:38.003] [baker-proto-Alpha-on-node1] Received event: step_current_phase.v0 = {
[13:51:38.003]   "phase": "Idle",
[13:51:38.003]   "event": [
[13:51:38.003]     "Timeout",
[13:51:38.003]     {
[13:51:38.003]       "kind": "Time_to_bake_next_level",
[13:51:38.003]       "round": 0
[13:51:38.003]     }
[13:51:38.003]   ]
[13:51:38.003] }

Manually testing the MR

dune exec tezt/tests/main.exe -- -t 'baker forked migration blocks from mumbai to alpha' -v

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Eugen Zalinescu

Merge request reports

Loading