Documentation
¶
Overview ¶
Package pipeline is one BRC-22 submission through the host: parse, SPV with overlay-bridge pkg/spv, the fee floor, then the engine's admission (topic managers, the BEEF blob, the index rows), each stage timed for R1 and each object's work counted for R2.
Verification runs here, before the engine, on the raw bytes, and the engine is told so through the context: its Verifier (the fork's one patch, see third_party/FORK.md) accepts a transaction this pipeline already verified and verifies anything else itself, with the same verifier. There is one Go verifier in the stack and it runs once per object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind string
Kind classifies a failed submission; the HTTP layer maps it to a status.
const ( KindMalformed Kind = metrics.ResultMalformed KindRefused Kind = metrics.ResultRefused KindPending Kind = metrics.ResultPending KindError Kind = metrics.ResultError )
Kinds, matching the overlay_go_submits_total result labels.
type Pipeline ¶
type Pipeline struct {
Engine *engine.Engine
Tracker chaintracker.ChainTracker
// Network and Finality configure pkg/spv (ruling R-g: finality ignore).
Network spv.Network
Finality spv.FinalityPolicy
// VerifyTimeout bounds one verification; zero is pkg/spv's 5 s.
VerifyTimeout time.Duration
// MinFeeSatPerKB refuses a subject paying less; 0 measures the fee stage
// and refuses nothing (the TypeScript engine checks no fee).
MinFeeSatPerKB uint64
// CommitTimeout bounds the engine's part of a submission. The engine runs
// on a context detached from the client's, so a client that hangs up
// cannot abandon the store writes halfway.
CommitTimeout time.Duration
Metrics *metrics.Metrics
Log *slog.Logger
// contains filtered or unexported fields
}
Pipeline submits objects into one engine.
func (*Pipeline) EngineVerifier ¶
func (p *Pipeline) EngineVerifier(ctx context.Context, tx *transaction.Transaction, txid *chainhash.Hash) error
EngineVerifier is the engine's Verifier. It accepts a subject this pipeline verified (the same parsed BEEF travels in the context) and verifies anything else in full with pkg/spv, so a submission that reaches the engine some other way (GASP, a future in-process caller) is never admitted unverified.