Skip to content

feat(consensus): add authority index to traces #7949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

filipdulic
Copy link

Description of change

Adds {authority:[n]}: in front of logs, where n is the AuhtorityIndex.
e.g:

2025-07-23T09:33:56.609802Z DEBUG {authority=[0]}: starfish_core::core: crates/starfish/core/src/core.rs:625: 0 transaction are consumed by a block

fixes #7944

Be sure to reference any related issues by adding fixes #(issue).

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

@filipdulic filipdulic requested a review from a team as a code owner July 23, 2025 09:43
Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am
iota-evm-bridge ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am
iota-multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:31am

@iota-ci iota-ci added consensus Issues related to the Core Consensus team core-protocol labels Jul 23, 2025
@filipdulic filipdulic self-assigned this Jul 23, 2025
@filipdulic filipdulic linked an issue Jul 23, 2025 that may be closed by this pull request
@filipdulic filipdulic changed the title fit(consensus): [starfish] add authority index to traces feat(consensus): add authority index to traces Jul 23, 2025
@filipdulic filipdulic removed their assignment Jul 23, 2025
Copy link
Contributor

@piotrm50 piotrm50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it going to be printed on all types of deployments? It's unnecessary when running a standalone node, so perhaps we could make it conditional only when running tests or iota start command? Otherwise it's fine for now.

@filipdulic filipdulic force-pushed the consensus/feat/starfish/7944-starfish-add-authority-index-to-traces branch from 84b7a6c to e22beb4 Compare July 24, 2025 11:25
@filipdulic
Copy link
Author

filipdulic commented Jul 24, 2025

Is it going to be printed on all types of deployments? It's unnecessary when running a standalone node, so perhaps we could make it conditional only when running tests or iota start command? Otherwise it's fine for now.

nice catch,
I amended the commit to use [cfg_attr(test, thus the added tracing instrument will only be run in tests.

…starfish/7944-starfish-add-authority-index-to-traces
@filipdulic filipdulic merged commit 2cc5c6b into consensus/feat/starfish-consensus Jul 24, 2025
23 of 27 checks passed
@filipdulic filipdulic deleted the consensus/feat/starfish/7944-starfish-add-authority-index-to-traces branch July 24, 2025 11:31
NaitsabesMue pushed a commit that referenced this pull request Jul 28, 2025
# Description of change

Adds `{authority:[n]}:` in front of logs for tests only, where `n` is the
`AuhtorityIndex`.
e.g:
```shell
2025-07-23T09:33:56.609802Z DEBUG {authority=[0]}: starfish_core::core: crates/starfish/core/src/core.rs:625: 0 transaction are consumed by a block
```


fixes #7944

Be sure to reference any related issues by adding `fixes #(issue)`.

## How the change has been tested

- [ ] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have checked that new and existing unit tests pass locally with
my changes

### Release Notes

- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus Issues related to the Core Consensus team core-protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(starfish): add authority index to traces
3 participants