Skip to content
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

getblockchaininfo missing transparent chain value after v5.10.0, requiring reindex #6943

Open
nuttycom opened this issue Aug 29, 2024 · 5 comments
Labels
A-chain-sync Area: Chain synchronization / Initial Block Download A-rpc-interface Area: RPC interface C-bug Category: This is a bug

Comments

@nuttycom
Copy link
Contributor

Describe the issue

Zcash Forum user Cacho reported in https://forum.zcashcommunity.com/t/nu6-testnet-activation-height-has-been-set/48646/20 that after upgrading from zcashd v5.9.1 to v5.10.0, the results of getblockchaininfo no longer included transparent chain value.

They later reported in https://forum.zcashcommunity.com/t/nu6-testnet-activation-height-has-been-set/48646/23 that reindexing made the data available again.

It is possible that the changes in f26bb38 introduced this error.

Can you reliably reproduce the issue?

Reproduction has not yet been attempted.

Expected behaviour

Transparent chain value persisted by v5.9.1 should still be accessible without a reindex after upgrading to v5.10.0

@nuttycom nuttycom added C-bug Category: This is a bug A-rpc-interface Area: RPC interface A-chain-sync Area: Chain synchronization / Initial Block Download labels Aug 29, 2024
@nuttycom
Copy link
Contributor Author

nuttycom commented Sep 4, 2024

@nuttycom
Copy link
Contributor Author

nuttycom commented Sep 4, 2024

@str4d
Copy link
Contributor

str4d commented Sep 6, 2024

zcashd computes and stores deltas for each block (i.e. ZEC added to or removed from a given pool). The chain values are computed dynamically in-memory as the sum of all deltas along a given chain. This happens initially on start, and then incrementally as new blocks are added.

If a user sees monitored: false at a given block height, that means somewhere in the chain prior to that height, there is a block missing either a delta or an in-memory chain value, which means all subsequent blocks cannot have in-memory chain values computed even if they have deltas.

@str4d
Copy link
Contributor

str4d commented Sep 6, 2024

In https://forum.zcashcommunity.com/t/nu6-testnet-activation-height-has-been-set/48646/43 the user reports that they have transparent chain value reported up to height 2630585, and then nothing starting from height 2630586. I checked my own zcashd node, which was running 5.10.0 at the time these blocks were mined, and does not have the monitoring drop (I have chain value balances reported up to the current chain tip). This is the sequence of blocks before and after that height, as connected by my node:

2024-08-31T21:22:46.858533Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000a848145caa3f895947a19600740bf3a95e5909e21e2ba721fca0a5 height=2630574 bits=469899895 log2_work=60.1689 tx=14718746 date=2024-08-31 21:22:37 progress=1.000000 cache=49.9MiB(10006tx)
2024-08-31T21:25:39.916849Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000017a86702a5ebe574a40e519f1c855310ba9560333e759c072dd2358 height=2630575 bits=469897471 log2_work=60.168901 tx=14718750 date=2024-08-31 21:25:01 progress=0.999999 cache=50.2MiB(10098tx)
2024-08-31T21:25:52.664971Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000003fb09c35860babe44a9c31271750a4f498a4227f1dab7a11ad6916 height=2630576 bits=469895144 log2_work=60.168902 tx=14718752 date=2024-08-31 21:25:39 progress=1.000000 cache=50.2MiB(10100tx)
2024-08-31T21:26:23.652027Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=000000000194c014d27c421809e059212595a6755204c4e636b851f46d5f6807 height=2630577 bits=469895399 log2_work=60.168902 tx=14718754 date=2024-08-31 21:25:52 progress=0.999999 cache=50.2MiB(10102tx)
2024-08-31T21:26:45.284534Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000009cfa75de7173253cddc5695255b715f2db4a4e2585b9dbc08e5b59 height=2630578 bits=469896351 log2_work=60.168903 tx=14718757 date=2024-08-31 21:26:23 progress=0.999999 cache=50.2MiB(10105tx)
2024-08-31T21:27:16.586658Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000508f577e9b28938b316e18de5d0ece7d1832256638176b91781fba height=2630579 bits=469894506 log2_work=60.168903 tx=14718759 date=2024-08-31 21:26:45 progress=0.999999 cache=50.2MiB(10107tx)
2024-08-31T21:27:30.785588Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000004c0cd8cc75e15d3adea358578041819116f20ec8f6ecc954a8c025 height=2630580 bits=469894957 log2_work=60.168904 tx=14718761 date=2024-08-31 21:27:16 progress=1.000000 cache=50.2MiB(10109tx)
2024-08-31T21:28:05.000341Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000001c8598fb9ac78e39191cce1bd3bab4bcb0bf478b5983423c771e033 height=2630581 bits=469896044 log2_work=60.168905 tx=14718763 date=2024-08-31 21:28:00 progress=1.000000 cache=50.2MiB(10111tx)
2024-08-31T21:30:00.832357Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000ccf5fff721907bf2ac1ef7e9f66f9e2e49b5350714762eba213b01 height=2630582 bits=469896450 log2_work=60.168905 tx=14718767 date=2024-08-31 21:29:35 progress=0.999999 cache=50.5MiB(10193tx)
2024-08-31T21:31:15.422021Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=000000000000fb4ae4bac3af50ac5bf84bf542ec79f75b01a7438a609640aa9c height=2630583 bits=469895992 log2_work=60.168906 tx=14718771 date=2024-08-31 21:30:45 progress=0.999999 cache=50.8MiB(10286tx)
2024-08-31T21:32:04.962084Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000012be45f5d59469c122300ab25a361f60489659c4af7dcbe04bbe99c height=2630584 bits=469893664 log2_work=60.168906 tx=14718774 date=2024-08-31 21:32:00 progress=1.000000 cache=51.3MiB(10409tx)
2024-08-31T21:32:08.061782Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000011354ebd1bb29f53aa74f50ffb340afd566a9356418300efd7262d3 height=2630585 bits=469892275 log2_work=60.168907 tx=14718776 date=2024-08-31 21:32:04 progress=1.000000 cache=51.3MiB(10411tx)
2024-08-31T21:34:22.668256Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=00000000004bdd663f52c9532eb5cda1fdf686a2b4f241a6dfda096ece8b5a6e height=2630586 bits=469890998 log2_work=60.168908 tx=14718779 date=2024-08-31 21:33:38 progress=0.999999 cache=51.6MiB(10593tx)
2024-08-31T21:35:14.198356Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000fe36ec066ec13d9ca90b82589442691b8ba1faf739bb2f5d03d0fc height=2630587 bits=469890851 log2_work=60.168908 tx=14718781 date=2024-08-31 21:34:22 progress=0.999999 cache=52.0MiB(10728tx)
2024-08-31T21:35:19.327660Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000001b8052904c70f9cea9c83bc09f1cb049e301710754232fd7cfda589 height=2630588 bits=469888069 log2_work=60.168909 tx=14718783 date=2024-08-31 21:35:14 progress=1.000000 cache=52.0MiB(10730tx)
2024-08-31T21:35:23.647691Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000001131dee0ff7d83b586a24aecbfd87cb7550287cf4b8eb2765a9fff4 height=2630589 bits=469888265 log2_work=60.168909 tx=14718786 date=2024-08-31 21:35:19 progress=1.000000 cache=52.0MiB(10733tx)
2024-08-31T21:35:27.179136Z  INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000e9e371fcd90c7d5516833709383a4acab926272989d111102b979e height=2630590 bits=469886571 log2_work=60.16891 tx=14718802 date=2024-08-31 21:35:23 progress=1.000000 cache=52.0MiB(10747tx)

Same rows, but now focusing on the more relevant data:

Height Chain tx Txs Block time Connected time
2630574 14718746 2024-08-31 21:22:37 2024-08-31 21:22:46
2630575 14718750 4 2024-08-31 21:25:01 2024-08-31 21:25:39
2630576 14718752 2 2024-08-31 21:25:39 2024-08-31 21:25:52
2630577 14718754 2 2024-08-31 21:25:52 2024-08-31 21:26:23
2630578 14718757 3 2024-08-31 21:26:23 2024-08-31 21:26:45
2630579 14718759 2 2024-08-31 21:26:45 2024-08-31 21:27:16
2630580 14718761 2 2024-08-31 21:27:16 2024-08-31 21:27:30
2630581 14718763 2 2024-08-31 21:28:00 2024-08-31 21:28:05
2630582 14718767 4 2024-08-31 21:29:35 2024-08-31 21:30:00
2630583 14718771 4 2024-08-31 21:30:45 2024-08-31 21:31:15
2630584 14718774 3 2024-08-31 21:32:00 2024-08-31 21:32:04
2630585 14718776 2 2024-08-31 21:32:04 2024-08-31 21:32:08
2630586 14718779 3 2024-08-31 21:33:38 2024-08-31 21:34:22
2630587 14718781 2 2024-08-31 21:34:22 2024-08-31 21:35:14
2630588 14718783 2 2024-08-31 21:35:14 2024-08-31 21:35:19
2630589 14718786 3 2024-08-31 21:35:19 2024-08-31 21:35:23
2630590 14718802 16 2024-08-31 21:35:23 2024-08-31 21:35:27

I observe that there are multiple repeated sequences of blocks (bold italics above) where the block time (the nTime field in the header) for a given block is (within the same second) exactly equal to the connection time (the timestamp from the log line) for its immediate parent block. This might be an artifact of the sandblasting going on (wrt verification of the block txs being equally costly on everyone), but seems unusual.

@daira
Copy link
Contributor

daira commented Sep 17, 2024

@str4d are those minimum-difficulty blocks?

[Edit: no, because they are mainnet blocks.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chain-sync Area: Chain synchronization / Initial Block Download A-rpc-interface Area: RPC interface C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants