Odysseia - BIP340

Odysseia - BIP340
Photo by Glenn Carstens-Peters / Unsplash

Both the addressing system and cryptography in ARK Core are based on Bitcoin. It started out with ECDSA-based cryptography. Moved to the first implementation of Schnorr, which turned out to contain some flaws that could leak private keys if equivalent ECDSA is present.

Odysseia goes a step further and implements the final BIP340 proposal for all cryptographic operations. Odysseia makes use of BIP340 for public keys, signatures and verification, as well as batch verification of signatures. This includes blocks which are currently still using ECDSA signatures in ARK Core.

Compared to the previous Schnorr implementation which was still using the old derivation scheme for public keys we are saving 1 byte per public key, which brings it down to 32-bytes in length versus 33-bytes. This also brings it in line with the length of signatures at 64-bytes, twice the length of a public key.

All public keys are now 32-bytes and signatures are 64-bytes. Compare this to 33-bytes and 71.5-bytes for ECDSA and we end up with nice savings in space for the serialisation of blocks and transactions. This allows the processing of more data because we need to process less per unit and also saves disk space.

Odysseia doesn't yet make extensive use of batch verification but first benchmarks of transfers with multiple payments look promising. Verifying 100000 transfers that contain 2 payments take 13.017s with batch verification in Odysseia and 60.862s with per-unit verification in ARK Core.

These results are impressive and if applied to block and transaction verification during synchronisation from scratch with the network have the potential to significantly speed up the process because instead of doing instant verification of each unit you could batch them into 5000 or more and if any single unit does not verify discard the whole batch.