nautechsystems/nautilus_trader · error
Signed transaction payload is {} bytes, exceeding the {} byt
Error message
Signed transaction payload is {} bytes, exceeding the {} byte limit What it means
Thrown in `seal` before encrypting, this error rejects plaintext payloads whose byte length exceeds `MAX_SIGNED_TRANSACTION_BYTES`. The library enforces a hard size ceiling on signed transaction payloads so sealed envelopes and storage stay within bounded limits.
Source
Thrown at crates/adapters/blockchain/src/execution/sealing.rs:161
&self.active_id
}
#[must_use]
pub(crate) fn deployment_id(&self) -> &str {
&self.deployment_id
}
#[must_use]
pub(crate) fn contains_key(&self, id: &[u8; KEY_ID_LEN]) -> bool {
self.keys.contains_key(id)
}
pub(crate) fn seal(
&self,
plaintext: &[u8],
context: &PayloadContext,
) -> anyhow::Result<Vec<u8>> {
anyhow::ensure!(
plaintext.len() <= MAX_SIGNED_TRANSACTION_BYTES,
"Signed transaction payload is {} bytes, exceeding the {} byte limit",
plaintext.len(),
MAX_SIGNED_TRANSACTION_BYTES
);
validate_context(context, &self.deployment_id)?;
let key = self
.keys
.get(&self.active_id)
.expect("active payload key missing from key set");
let aad = encode_aad(&self.active_id, context)?;
let mut ciphertext = plaintext.to_vec();
let nonce = key
.seal_in_place_append_tag(Aad::from(aad), &mut ciphertext)
.map_err(|_| anyhow::anyhow!("Failed to seal signed transaction payload"))?;
let mut envelope = Vec::with_capacity(ENVELOPE_HEADER_LEN + ciphertext.len());View on GitHub (pinned to 18893faf8b)
Solutions
- Split or truncate the payload so each sealed transaction payload is under `MAX_SIGNED_TRANSACTION_BYTES`
- Reduce batch size in `migrate_execution_payload_batch` / `rewrap_execution_payload_batch` calls
- Check the plaintext for accidental duplication or oversized attachments before sealing
Example fix
// before
let sealed = sealer.seal(&entire_batch, &ctx)?;
// after
for payload in batch.chunks(MAX_SIGNED_TRANSACTION_BYTES_SLICE_COUNT) {
let sealed = sealer.seal(payload, &ctx)?;
} Defensive patterns
Strategy: validation
Validate before calling
if plaintext.len() > MAX_SIGNED_TRANSACTION_BYTES {
return Err(anyhow!("payload too large: {} bytes", plaintext.len()));
} Try / catch
match sealer.seal(&plaintext, &ctx) {
Ok(sealed) => /* ... */,
Err(e) if e.to_string().contains("byte limit") => split_or_reduce_batch(),
Err(e) => return Err(e),
} Prevention
- Check plaintext size against MAX_SIGNED_TRANSACTION_BYTES before sealing
- Keep batches small enough that each payload stays under the limit
- Add a size assertion in tests for the largest realistic transaction payload
When it happens
Trigger: Calling `seal` (directly or via `migrate_execution_payload_batch` / `rewrap_execution_payload_batch`) with a plaintext larger than the configured maximum byte limit.
Common situations: Batches of transactions aggregated into one payload that grew past the limit, misconfigured limit values, or accidentally passing an entire batch file instead of a single payload.
Understand the failure class
Background: payload too large / request exceeds maximum size: why libraries cap bytes and how to fix oversize payloads — this error's family across 50 libraries.
Related errors
- Unsealed transaction payload is {} bytes, exceeding the {} b
- Payload deployment or retired keys require an active payload
- Payload deployment ID is required when payload sealing is co
- Unsupported `OrderSide` for Binance: {value:?}
- invalid OrderSide: must be Buy or Sell, was {side}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/a7898f68ef11c04e.
Report an issue: GitHub.