v3.1: feat(ledger-tool): fix ed25519 program testnet deployment (backport of #9352)#9373
v3.1: feat(ledger-tool): fix ed25519 program testnet deployment (backport of #9352)#9373
Conversation
(cherry picked from commit 5f82055)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3.1 #9373 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 865 865
Lines 375946 375946
=========================================
- Hits 313033 312975 -58
- Misses 62913 62971 +58 🚀 New features to boost your workflow:
|
|
this isn't going to mess up any of the account hash calculations because it's off curve, right? |
don't think so. |
brooksprumo
left a comment
There was a problem hiding this comment.
LGTM from the accounts lt hash/snapshots side of things. I'll defer to others on correctness of the account data/owner.
| ed25519_program_account.set_owner(native_loader::id()); | ||
| ed25519_program_account.set_data_from_slice(b"ed25519_program"); | ||
|
|
||
| bank.store_account(&ed25519_program::id(), &ed25519_program_account); |
There was a problem hiding this comment.
This PR correctly sets child_bank_required (line 2187 above), so we're safe to make changes to accounts here. The child bank should compute the accounts lt hash correctly during bank freeze as part of taking the snapshot.
It looks like the existing account has no data (line 2325 above). So I would expect that we will need to also pass in --enable-capitalization-change as well, since iiuc the account data size will change on this account.
There was a problem hiding this comment.
you should be right, but it's a builtin owned by native loader so subject to that stupid 1-lamport rent-exempt reserve special-case
Problem
the ed25519 precompile program deployment on testnet has been broken since forever. this breeds confusion and introduces unnecessary corner case bugs
Summary of Changes
rewrite it to the expected values
This is an automatic backport of pull request #9352 done by Mergify.