Files
zeekay f480e48e39 run on the native fleet
Adds .hanzo/workflows/cicd.yml calling the canonical pipeline and drops the
GitHub-hosted workflows it replaces. Lands here because this is where the repo
is written — git.hanzo.ai is upstream and github.com is its push mirror, so the
same change made on github.com never reaches the runner fleet.
2026-08-20 20:20:25 -07:00

43 lines
1.1 KiB
Go

// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package block
import (
"time"
"github.com/luxfi/ids"
"github.com/luxfi/proto/p/txs"
"github.com/luxfi/runtime"
)
// RuntimeInitializable binds a runtime into a block's embedded txs.
type RuntimeInitializable interface {
InitRuntime(rt *runtime.Runtime)
}
// Block is the common stateless interface for all P-chain blocks. Every block
// is a single native-ZAP object; there is no codec and no initialize step —
// the bytes are authoritative and blocks are built by New*Block or read by
// Parse, both of which bind ID = hash(bytes).
type Block interface {
RuntimeInitializable
ID() ids.ID
Parent() ids.ID
Bytes() []byte
Height() uint64
// Txs returns the transactions contained in the block.
Txs() []*txs.Tx
// Visit calls [visitor] with this block's concrete type.
Visit(visitor Visitor) error
}
// TimestampedBlock is a Block that carries a per-block timestamp. Every
// canonical P-chain block kind is timestamped.
type TimestampedBlock interface {
Block
Timestamp() time.Time
}