Commit 594b9c6
fix: Render full 48-byte ETH2 deposit BLS pubkey on validator screen
The ETH2 deposit plugin reassembled the 48-byte BLS12-381 G1
compressed pubkey from two parameter chunks, then passed the raw
buffer to getEthDisplayableAddress() to produce the screen string.
That helper is hard-coded for 20-byte Ethereum addresses: its inner
getEthAddressStringFromBinary() loops `for (i = 0; i < 20; i++)` and
silently ignores the trailing 28 bytes of the pubkey. The validator
"deposit address" shown to the user was therefore only the first 20
bytes of the 48-byte pubkey, hex-encoded, leaving the user unable to
verify they were approving the intended validator.
Keep the pubkey stored as raw 48 bytes and render it on screen as
"0x" + bytes_to_lowercase_hex() inside the QUERY_CONTRACT_UI
handler. Lowercase matches the casing the original
getEthDisplayableAddress path produced for the truncated display.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent cec3fbb commit 594b9c6
17 files changed
Lines changed: 16 additions & 15 deletions
File tree
- src/plugins/eth2
- tests/ragger/snapshots
- apex_p/test_eth2_deposit
- flex/test_eth2_deposit
- nanosp/test_eth2_deposit
- nanox/test_eth2_deposit
- stax/test_eth2_deposit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 114 | | |
126 | 115 | | |
127 | 116 | | |
| |||
212 | 201 | | |
213 | 202 | | |
214 | 203 | | |
215 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
Loading
Loading
Loading
Loading
Loading
0 commit comments