Solana: Address Lookup Table Not Packing Addresses As Expected
A recent transaction involving the Solana blockchain has exposed an issue with the address lookup table, a critical part of the network’s decentralized finance (DeFi) ecosystem. The issue occurs when a user attempts to view their own address in Solana Explorer.
Transaction
On December 2, a developer shared an event on the Solana blockchain explorer Explorer.Solana.com that reported an issue with the address lookup table. Specifically, the event included sending an event with the following information:
- Event ID:
5FvqJxfoffeBGMwQHh618KzZcNSHCmfdvY4xwNJBsSDyfNEqWpJ9R1FZSWRccyKkrsUDt4ZG3YaZEdvmawHSPT2X
- Cluster: “devnet”.
Issue
While investigating the incident, it was revealed that the lookup address table is not compressing addresses as expected. In Solana, addresses are typically represented in a specific format that includes a checksum of the entire address, which is used to verify the authenticity and integrity of the transaction. However, when this checksum is calculated for an address, it does not always match the original address.
Issue
The issue is that the lookup address table uses a simple hash function to calculate the checksum for each address. While this approach may seem adequate in many cases, it is not robust enough to handle certain types of addresses or edge cases. Specifically:
- Single-character addresses
: When using a single-character address (e.g. “abc”), the lookup address table does not calculate the checksum correctly.
- Address extensions
: Some Solana addresses have extensions that require additional information that can be lost when calculating the checksum.
Conclusion
The issue with Solana’s address lookup table is important to highlight. While the blockchain design has many strengths, its reliance on a simple hash function to calculate checksums can lead to errors and inconsistencies in some cases. Developers and users should be aware of this potential issue when working with Solana network addresses.
Recommendations
To mitigate this issue, it is recommended that developers:
- Use stronger address formats, such as multi-character addresses or addresses with extensions.
- Perform additional checks to ensure the integrity of the address before using it for transactions.
Additionally, users should exercise caution when working with Solana network addresses and consider seeking assistance from experienced developers or Solana experts if they encounter issues with address lookup tables.