Merge 605b35531e88ac4895939f16edf4311813c34026 into 591f8771e8c06b916e29f6223e27af728780063a
1fd80b05
pull/357/merge
28/838 ++ 480 --
Commits and releases over time
No repositories match that filter.
Raises the transaction limits consensus v42 relaxed, and adds the heartbeat field that claims the challenge fee discount. Two of the existing limits were not merely stale, they were rejecting transactions the network accepts: extra program pages was capped at 3 against v42's 7, and total app args at 2048 against 16384. The program-size check derives from the page count, so it was wrong through the same root. Both now carry the absolute value, with the old number kept alongside as BASE_ to mark where the per-byte surcharge begins rather than where rejection does. Note and logicsig limits follow the same pairing. Every value is taken from config/consensus.go at v5.0.0-stable. Heartbeat gains challenge_discount on codec tag "c". It is a request, not an assertion: the node grants it only if the account is genuinely under challenge. Declining it has to encode identically to omitting it, or the transaction ID would change for a heartbeat that asked for nothing, so it follows the Option<bool> plus is_false_opt convention already used by non_participation. estimate_size is deliberately unchanged. Falcon-1024 is not priced by byte count: signatureFeeContribution dispatches a flat 2e6 factor per scheme regardless of signature length. Inflating the size estimate would feed calculate_fee, which still multiplies size by fee_per_byte, and produce a fee that does not match the network. The fee factor constants are added here so the usage-based engine can apply them correctly. One existing test used 17 args of 700 bytes as both too many and too large. That total is legal under the new cap, so it is resized to keep its meaning.
Adds the consensus v42 post-quantum signature envelope and the address
derivation that goes with it.
PQSignature carries the scheme, salt, public key, and signature under the
codec tags go-algorand uses ("sch"/"slt"/"pk"/"sig"), all omitempty. It can
sit at the top of a SignedTransaction as "pqsig", or one level down inside a
LogicSignature to delegate a program; both slots count toward the existing
single-delegation rule, so a transaction still cannot carry two.
A post-quantum address is the hash of the public key plus a salt, resampled
until the result is not a valid Edwards25519 point. That keeps the new
addresses from colliding with real ed25519 public keys. The point check lands
in algokit_crypto and deliberately matches go's permissive decoder: it accepts
non-canonical encodings and small-order points, because a stricter predicate
would reject salts that the network accepts and derive the wrong address.
The crate does not bundle a Falcon-1024 implementation. PQKeyAndSigner lets a
caller supply one, mirroring the existing Ed25519KeyAndSigner shape.
Signature fields now omit all-zero values as well as absent ones, since an
unsigned envelope and a zero-filled one must encode identically.
Test data is vendored under algokit_test_artifacts/pq with secret keys
stripped; it gets re-pointed at the shared fixtures in a later phase.