Baker: improve delegate info in events
What
Improve some baker events:
- Display delegate manager key's alias when the key is known to the baker
- Print whether attestations are with or without DAL
- Only print companion key when it is relevant (ie. for attestations with DAL with a BLS consensus key)
- Add more cut hints for better line wrapping
Before:
Jul 15 11:08:28.782 NOTICE │ injected attestation opVYC3goKJKeZJsVdqiXrnzXgdWABEseYh77gGQ5ho5sGtphquG for
Jul 15 11:08:28.782 NOTICE │ manager4 (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) with companion key companion4 (tz4TjvtyQHP8dGZcHbWnq2bcFxrqL7syY7Na)
Jul 15 11:08:28.782 NOTICE │ for level 137318, round 0
Jul 15 11:08:28.782 NOTICE │ injected attestation ooYcyDAUertpAiPvt8rYExCunjRUWTGTqefBYGQgxEi3xUCHNrJ for
Jul 15 11:08:28.782 NOTICE │ consensus2 (tz499F5bXKe5w9JwsDkbdyY5JVkYRbHgoksw)
Jul 15 11:08:28.782 NOTICE │ on behalf of tz2QFeLuTgAkwdVch3BuZLSZrQGCL2mQwMsG for level 137318, round 0
Jul 15 11:08:28.782 NOTICE │ injected attestation oomJNMGfDqNiW5zA5sVNFuRPVKDSBe1pSjkKk8cVLo34zQDQjJE for
Jul 15 11:08:28.782 NOTICE │ manager3 (tz3NhWQ6D5nAekyoGSchZqzADH2sKdwKaTXR) for level 137318, round 0
Jul 15 11:08:28.782 NOTICE │ injected attestation ooE21Rg7r9Ada9wRTU5tg4UrBxDD3unNf1HNUguExgZakX8dyBV for
Jul 15 11:08:28.782 NOTICE │ consensus1 (tz1brTKkyLdWPLvZb5QS2GZNay6n9xTXXuZo)
Jul 15 11:08:28.782 NOTICE │ on behalf of tz1LpeaVCh8ZgixdTcNcuSTXqXLwvg4AueUi for level 137318, round 0
With this MR:
Jul 15 11:19:40.462 NOTICE │ injected attestation (with DAL) for level 137486, round 0 for delegate
Jul 15 11:19:40.462 NOTICE │ 'manager1' (tz1LpeaVCh8ZgixdTcNcuSTXqXLwvg4AueUi) with consensus key
Jul 15 11:19:40.462 NOTICE │ 'consensus1' (tz1brTKkyLdWPLvZb5QS2GZNay6n9xTXXuZo)
Jul 15 11:19:40.462 NOTICE │ (operation hash: ongCEEHwe1Uzn8cQvJeCNeoJLrB29q2mpYYfAjYx4iohtE9GfM2)
Jul 15 11:19:40.462 NOTICE │ injected attestation (with DAL) for level 137486, round 0 for delegate
Jul 15 11:19:40.462 NOTICE │ 'manager3' (tz3NhWQ6D5nAekyoGSchZqzADH2sKdwKaTXR) with consensus key
Jul 15 11:19:40.462 NOTICE │ 'manager3' (tz3NhWQ6D5nAekyoGSchZqzADH2sKdwKaTXR)
Jul 15 11:19:40.462 NOTICE │ (operation hash: ooa1iMCYkSXKxJt4spNzcRwipTnSbTpGMwXTgkWf2xgUaSnRBQo)
Jul 15 11:19:40.462 NOTICE │ injected attestation (with DAL) for level 137486, round 0 for delegate
Jul 15 11:19:40.462 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) with consensus key
Jul 15 11:19:40.462 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) and companion key
Jul 15 11:19:40.462 NOTICE │ 'companion4' (tz4TjvtyQHP8dGZcHbWnq2bcFxrqL7syY7Na)
Jul 15 11:19:40.462 NOTICE │ (operation hash: opQ6teyCYPyF3ZJtzTTrHrbNezibmgdxTPPK2p19LzcTv4JLV5C)
Jul 15 11:19:40.462 NOTICE │ injected attestation (with DAL) for level 137486, round 0 for delegate
Jul 15 11:19:40.462 NOTICE │ 'manager2' (tz2QFeLuTgAkwdVch3BuZLSZrQGCL2mQwMsG) with consensus key
Jul 15 11:19:40.462 NOTICE │ 'consensus2' (tz499F5bXKe5w9JwsDkbdyY5JVkYRbHgoksw)
Jul 15 11:19:40.462 NOTICE │ (operation hash: ooTKaCtrd5AWRJ6KhJmH8xUpd3HNMkAbCraZPhbFN8Ucsnes19u)
For preattestations, the companion key is not useful:
Before:
Jul 15 11:08:28.166 NOTICE │ injected preattestation oom4C4ZpZhdc86d9oVLkcuNww1fpdEoiPYtQRh8WhLzim3H6w5Q for
Jul 15 11:08:28.166 NOTICE │ manager4 (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) with companion key companion4 (tz4TjvtyQHP8dGZcHbWnq2bcFxrqL7syY7Na)
Jul 15 11:08:28.166 NOTICE │ for level 137318, round 0
Now:
Jul 15 11:19:40.391 NOTICE │ injected preattestation for level 137486, round 0 for delegate
Jul 15 11:19:40.391 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) with consensus key
Jul 15 11:19:40.391 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN)
Jul 15 11:19:40.391 NOTICE │ (operation hash: ontFQdoN9mLdYi8ovgMJZzR471s9BXe7NFaDi4geHHSvD6N7oT8)
With no DAL node, the companion key is not needed either:
Jul 15 11:29:32.434 NOTICE │ injected attestation (without DAL) for level 137634, round 0 for delegate
Jul 15 11:29:32.434 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN) with consensus key
Jul 15 11:29:32.434 NOTICE │ 'manager4' (tz4F9aG2RYideDvnFkeGZbsHpGxz48Yi6AVN)
Jul 15 11:29:32.434 NOTICE │ (operation hash: onz7Tx9YDBxxpTonzyYNUFNiYMnPpC4fmGbegvxkHrQmce3kzm6)
Without providing the manager key "manager1" to the baker (but still providing the consensus key):
Jul 15 11:32:56.852 NOTICE │ injected attestation (with DAL) for level 137685, round 0 for delegate
Jul 15 11:32:56.852 NOTICE │ tz1LpeaVCh8ZgixdTcNcuSTXqXLwvg4AueUi with consensus key
Jul 15 11:32:56.852 NOTICE │ 'consensus1' (tz1brTKkyLdWPLvZb5QS2GZNay6n9xTXXuZo)
Jul 15 11:32:56.852 NOTICE │ (operation hash: onw6wWG7c24Y5mLMk99zDA4izg1ayfsAxvH6DDdBFvDDyypyovP)
Why
How
Manually testing the MR
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.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Diane Gallois-Wong