Solana's mainnet has activated a built-in system call that directly invokes the SHA-512 hash function.
CoinPost reported on Tuesday that Solana developer Anza said improvement proposal SIMD-0512 has been applied starting from epoch 1103, which began on Monday.
As a result, programs running on Solana can calculate SHA-512 hash values using the built-in function 'sol_sha512'. Previously, validator software Agave and Firedancer had SHA-512 internally, but programs could not call it directly and had to rely on software implementations.
Dean Little (딘 리틀), a developer at Blueshift, explained that SHA-512 is used in the Ed25519 digital-signature scheme to check whether a signature is valid. Solana programs can now call the new 'sol_sha512' function, as they do the existing SHA-256 function, to convert data into a 64-byte hash value. The feature has applied since slot 476,496,000, when epoch 1103 began on Solana.
The method for calculating compute costs is the same as for SHA-256. Solana expresses compute usage in compute units (CU). The base cost is 85 CU, and for each input chunk it adds the larger of 10 CU and half the number of bytes in that chunk. Processing a single 32-byte chunk costs 101 CU. Little estimated that if a program calculates a hash using its own code, even a short message could require several thousand CU.
Ed25519 signature verification as a whole, including hash calculation, requires more compute resources. A test program that verified 32 cases showed an average cost of 3,808.78 CU per signature. When stricter verification conditions were applied, the average was 3,822.16 CU. Using the new built-in function can reduce the compute used for hash calculation within that total.
The update does not change the network's basic economic structure. Solana specified that the 1.4 million CU per-transaction limit, the fee-market structure, SOL supply, staking rewards and the inflation schedule will not change. It was also designed so that existing programs that do not call 'sol_sha512' and other functions are not affected.
This structure lowers the chance of conflicts with existing applications by allowing developers to adopt the new function only when needed. As a result, a key point to watch will be how quickly programs tied to Ed25519 verification switch in practice from software implementations to native calls.
SIMD-0512 is live on mainnet as of epoch 1103. Programs get sol_sha512, the same interface as sol_sha256, but with a 64-byte digest. Anything that implemented SHA-512 in BPF for Ed25519-adjacent work can drop the hand-rolled version for the native one at a fraction of the CUs. https://t.co/l45Gv0Zq1h