OptionalcauseOptionalstackStaticstackThe Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
StaticcaptureCreates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
OptionalconstructorOpt: FunctionStaticprepare
One attempt's answers about a hop disagree with each other.
A hop is assembled from four separate responses: the transaction's status, its merkle proof, the block's header, and the block's transaction count. Nothing forces a backend to make them agree, and the bundle verifier is what proves they do. That verification runs after the build loop has been left, so an answer that is well formed and wrong used to cost the whole walk and then report the bundle invalid, with the other configured backends never asked.
assembleAnchoredHoptherefore folds the hop against itself before returning, and this class is what it raises.It is not a domain refusal. It says nothing about the chain, only that one backend's answers do not describe one block on the chain this build is configured for, or that the transaction those answers place there is one no verifier will read. Everything that raises it is one backend's word failing: answers that contradict each other, answers that agree on a block whose header is under the configured proof-of-work floor or fails the target it states itself, a block info field that disagrees with the status or the header the same backend served, a transaction whose stripped serialization is 64 bytes, a custody hop the backend places before the hop it spends, a terminal coinbase the backend places anywhere but position 0 of its block, and a reveal whose envelope does not bind to its commit output. The loops record any of them as that attempt producing no usable answer and lead the next attempt with another backend. It never reaches the CLI as a refusal.