You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently transactions are limited to 1232 bytes, which makes it difficult to exceed a number of constraints on transactions. These are enforced by the validator but not currently by Kit. They become trivially easy to exceed given 4096 byte transactions.
Transaction size is covered separately by #1221 and should not be changed in this issue, which is a prerequisite for that
But signature count, account count, instruction count, are all able to be exceeded with 4096 byte transactions, but explicitly not relaxed for v1 transactions. This means that these constraints apply to all transaction versions.
accounts/instruction is unchanged, and probably currently implicitly covered by its encoder, which likely throws if we try to encode a longer array length. But it probably makes sense to give it the same error handling as the others.
Kit should not allow transactions that violate these constraints to be compiled.
Details
This is a prerequisite for SIMD 296 - Larger Transaction Size #1221, as it becomes very easy to accidentally violate these constraints with a 4096 byte transaction. But these constraints also apply to legacy/v0 transactions, so this work can be done independently
We need a helpful error for each constraint
At a minimum, we probably want to throw in compileTransactionMessage if the input transaction message violates any constraints
We need to think carefully about making sure the transaction planner API enforces these constraints as it is packing transactions
Supersedes #1102, which only considers the instruction count
Motivation
Currently transactions are limited to 1232 bytes, which makes it difficult to exceed a number of constraints on transactions. These are enforced by the validator but not currently by Kit. They become trivially easy to exceed given 4096 byte transactions.
See constraints in SIMD for V1 transactions
Transaction size is covered separately by #1221 and should not be changed in this issue, which is a prerequisite for that
But signature count, account count, instruction count, are all able to be exceeded with 4096 byte transactions, but explicitly not relaxed for v1 transactions. This means that these constraints apply to all transaction versions.
accounts/instructionis unchanged, and probably currently implicitly covered by its encoder, which likely throws if we try to encode a longer array length. But it probably makes sense to give it the same error handling as the others.Kit should not allow transactions that violate these constraints to be compiled.
Details
compileTransactionMessageif the input transaction message violates any constraintsSupersedes #1102, which only considers the instruction count