NethermindEth / NethermindEth/juno

Remove dead deprecated get_transaction code path

Open
#3,871 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
444
Forks
244
Avg merge
2d 15h
Merged PRs (30d)
78

Description

While going through the deprecated markers in the codebase I noticed the whole get_transaction chain is dead code — nothing in production calls it anymore:

  • StarknetData.Transaction() (starknetdata/starknetdata.go) — declared on the interface but never called
  • Feeder.Transaction() (starknetdata/feeder/feeder.go) — only implements the above
  • Client.Transaction() (clients/feeder/feeder.go) — hits the legacy get_transaction feeder gateway endpoint
  • starknet.DeprecatedTransactionStatus (starknet/transaction.go) — only used by the method above

The only remaining references are the interface declarations, generated mocks, and a few tests that exercise the chain directly. On top of being unused, this is the last code path touching the legacy get_transaction endpoint, and it carries a //nolint:staticcheck escape in the feeder client.

Proposal: remove the method from both interfaces, drop the implementations and the DeprecatedTransactionStatus type, regenerate mocks, and clean up the tests. Happy to send a PR for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Transaction declarations and implementations in starknetdata/starknetdata.go, starknetdata/feeder/feeder.go, clients/feeder/feeder.go, and starknet/transaction.go, then inspect the generated mocks and tests that reference them. Done means the dead methods, DeprecatedTransactionStatus type, legacy endpoint path, mock references, and related tests are removed while the remaining tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.