Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Revert "Split compute budget instructions process from struct itself … #33784

Conversation

steviez
Copy link
Contributor

@steviez steviez commented Oct 20, 2023

Problem

#33513 (which added c73bebe) was found to be a consensus breaking change. A canary (mce5) running the tip of master diverged from consensus; I debugged and found the offending slot and then bisected.

// Good hash (taken from another node)
[2023-10-20T07:02:29.153219516Z INFO  solana_runtime::bank] bank frozen: 224820287 hash: DwtKodrR4LxqZfbP6WtBrjteWQi9do9cSHPNAHEsnJc3 ...

// Bad hash (taken from mce5)
[2023-10-20T07:07:44.718105955Z INFO  solana_runtime::bank] bank frozen: 224820287 hash: E7vuWs9L184A6CwRABRG9hWJdweq8D5LbbK2iucnwxkk ...

Here is the bad hash produced by c73bebe

$ cat c73bebe9847ecd5a1cbffa96bf03e03a7683232f_verify_224820287.log | grep "bank frozen: 224820287"
[2023-10-20T12:24:15.128837014Z INFO  solana_runtime::bank] bank frozen: 224820287 hash: E7vuWs9L184A6CwRABRG9hWJdweq8D5LbbK2iucnwxkk ...

And here is the correct hash produced by c73bebe's parent, 4e5c545:

$ cat 4e5c545e23fb9a74c2fed5b5ea49edb02f64744e_verify_224820287.log | grep "bank frozen: 224820287"
[2023-10-20T12:19:00.173143740Z INFO  solana_runtime::bank] bank frozen: 224820287 hash: DwtKodrR4LxqZfbP6WtBrjteWQi9do9cSHPNAHEsnJc3 ...

Summary of Changes

Revert problematic commit

…olana-labs#33513)"

This reverts commit c73bebe.

This commit was found to be a consensus breaking change for the tip of
master.
@steviez
Copy link
Contributor Author

steviez commented Oct 20, 2023

I generated debug files with each version (attached at bottom of this comment) to help us narrow down. These are human readable so we can do a basic diff:

$ diff 224820287-DwtKodrR4LxqZfbP6WtBrjteWQi9do9cSHPNAHEsnJc3.json 224820287-E7vuWs9L184A6CwRABRG9hWJdweq8D5LbbK2iucnwxkk.json
2c2
<   "version": "1.17.2 (src:00000000; feat:3079302975, client:SolanaLabs)",
---
>   "version": "1.18.0 (src:00000000; feat:3079302975, client:SolanaLabs)",
5c5
<   "bank_hash": "DwtKodrR4LxqZfbP6WtBrjteWQi9do9cSHPNAHEsnJc3",
---
>   "bank_hash": "E7vuWs9L184A6CwRABRG9hWJdweq8D5LbbK2iucnwxkk",
7c7
<   "accounts_delta_hash": "3mJ9VLXJgLFnE8iPF8W9CSLpfxvdC3NUfi6k1fWhjTnu",
---
>   "accounts_delta_hash": "FkoCdzWY4axpa2ZoWbMnLpR8yWXvs5H6XJG6uTjqQers",
1363c1363
<       "hash": "CgHk8GKuyJ4WJ7VJdAZNwndfPGH8KFSL5pnd3iRs6CLR",
---
>       "hash": "5KqCT4hgPgYnZMfFd5bL2ruRCKX3eneye7TMJDDyDUMu",
1365c1365
<       "lamports": 9270460912,
---
>       "lamports": 9270461608,
13216c13216
<       "hash": "GmNZBkdAL6YEjH3DbbCx8dKbYTQ9vNyoZoc81mbxAkdb",
---
>       "hash": "6wd3UCg6YKrCrJwsfRfAZoTgxrNa5as5ZfN3yEkVuGtS",
13218c13218
<       "lamports": 2425999982629,
---
>       "lamports": 2425999982281,

Looking up those hashes in each file, the two accounts that differ are:

4KVBskF8LWptkBCC1Ldj98Ym7ndHhvVfnwS3AJDwUSzw
FBKFWadXZJahGtFitAsBvbqh5968gLY7dMBBJUoUjeNi

4KV appears in 3 transactions in slot 224820287 and has 696 (2 * 348) "extra" lamports with the to-be-reverted commit

y3zB9LyqasD9ANMVdYxFXXpQsBBPneecTTgkdUGDa8WvnN7anMQBxgM6xNN1QhXeeKNYMuWFTr2DZWAifYEqqop
x1Fi6X3FmYUaqpS4DRsk5kR4RjK6jW5dHyyHRMHNLUCSdwwxmxz8RgfrqyYEZRKc5Kwxbxq2TgPYGWrwygAA6qW
YeLzPiVhYpWMZHkVeq1Q8NdkwgoqZTiCy1f6JcCN8fiNq7shWtiKM772ZKSuHKWKthRNnsabGptbP1pGfEfRZde

whereas FBK appears in one transaction and has 348 lamports "missing" with the to-be-reverted commit

2aPVH3MMz2bBfLUoMc4E87eDNC5tGxTuzTzXBn7Zx6pqWZqKcLrHNNsdJgb2XoJs8Ed6qG7RAWQG6vUUMQbk1kZG

224820287-DwtKodrR4LxqZfbP6WtBrjteWQi9do9cSHPNAHEsnJc3.json
224820287-E7vuWs9L184A6CwRABRG9hWJdweq8D5LbbK2iucnwxkk.json

@steviez steviez marked this pull request as ready for review October 20, 2023 13:20
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Merging #33784 (fb69d37) into master (092c213) will decrease coverage by 0.1%.
Report is 1 commits behind head on master.
The diff coverage is 92.3%.

@@            Coverage Diff            @@
##           master   #33784     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         807      806      -1     
  Lines      218029   218059     +30     
=========================================
+ Hits       178385   178399     +14     
- Misses      39644    39660     +16     

@steviez steviez merged commit c98c24b into solana-labs:master Oct 20, 2023
@steviez steviez deleted the revert_c73bebe9847ecd5a1cbffa96bf03e03a7683232f branch October 20, 2023 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants