Skip to content

docs/site: debug_getModifiedAccountsBy* return null for an empty range - #25937

Open
RyoKusnadi wants to merge 2 commits into
erigontech:mainfrom
RyoKusnadi:docs/modified-accounts-null-on-empty-range
Open

RyoKusnadi wants to merge 2 commits into
erigontech:mainfrom
RyoKusnadi:docs/modified-accounts-null-on-empty-range

Conversation

@RyoKusnadi

@RyoKusnadi RyoKusnadi commented Nov 8, 2026 •

Copy link
Copy Markdown

The Returns tables for debug_getModifiedAccountsByNumber and debug_getModifiedAccountsByHash only said "Array of modified account addresses". They didn't say what comes back when no account changed in the range.

Problem: someone reading the docs expects [] for an empty range. The node answers null.

Cause: the methods return a nil slice when nothing changed, which is encoded as null. Geth's getModifiedAccounts does the same, and this method isn't in execution-apis, so the node keeps that on purpose.

Change: both Returns rows now say "Array of modified account addresses, or null if no account changed in the range (same as Geth)", in docs/site/docs/interacting-with-erigon/debug.md. The wording is the one lupin012 suggested. The same two rows are updated in llms-full.txt and docs/site/static/llms-full.txt, so the generate-llms.py --check step stays in sync.

Scope: only these two methods. No code change. I first tried returning [] in #25745 and closed it to keep Geth parity.

Testing: docs only. The two llms-full.txt files were edited by hand to match the generator's table format (inline code keeps its backticks); I didn't run the docs build or generate-llms.py --check locally, so the docs-site / build check is the real test. Environment: main @ 7f2df48.

Fixes #25649

The Returns tables only said 'Array of modified account addresses'. When no account changed in the range the methods return null, same as Geth.

Signed-off-by: Ryo Kusnadi <ryokusnadi@gmail.com>
@lupin012

lupin012 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

@RyoKusnadi thanks, the wording looks good. Two small things:

  1. Please regenerate llms-full.txt and docs/site/static/llms-full.txt (python3 docs/site/scripts/generate-llms.py after npm run build in docs/site, or just update the two lines by hand). Otherwise the generate-llms.py --check step in the docs build will fail.
  2. Please add Fixes debug_getModifiedAccountsByHash returns null instead of [] when no account changed #25649 to the description, so the issue is closed on merge.

…wording

Signed-off-by: Ryo Kusnadi <ryokusnadi@gmail.com>
@RyoKusnadi

Copy link
Copy Markdown
Author

Done in 92a675b, updated the two lines by hand in both llms-full.txt files. Also added Fixes #25649 to the description. @lupin012 mind taking another look?

@lupin012

lupin012 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

LGTM from my side. Both points were addressed in 92a675b and docs-site / build is green. @VBulikov could you approve it as docs maintainer?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug_getModifiedAccountsByHash returns null instead of [] when no account changed

2 participants