No description
Find a file
Snider 76488e0beb
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
feat(wire): add alias entry readers + AX usage-example comments
Add readExtraAliasEntryOld (tag 20) and readExtraAliasEntry (tag 33)
wire readers so the node can deserialise blocks containing alias
registrations. Without these readers, mainnet sync would fail on any
block with an alias transaction. Three round-trip tests validate the
new readers.

Also apply AX-2 (comments as usage examples) across 12 files: add
concrete usage-example comments to exported functions in config/,
types/, wire/, chain/, difficulty/, and consensus/. Fix stale doc
in consensus/doc.go that incorrectly referenced *config.ChainConfig.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 08:46:54 +01:00
.core chore: add .core/build.yaml for core-chain binary 2026-03-09 16:24:05 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:02 +00:00
chain feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
cmd/core-chain refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
config feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
consensus feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
crypto build(crypto): select randomx sources by architecture 2026-04-04 22:57:24 +00:00
difficulty feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
docs refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
mining refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
p2p refactor(p2p): reuse build-version helper in handshake validation 2026-04-04 22:35:02 +00:00
rpc refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
testdata feat(consensus): V2 Zarcanum signature and proof verification 2026-02-22 00:06:10 +00:00
tui feat(tui): render tx inputs explicitly 2026-04-04 22:51:57 +00:00
types feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
wallet fix(types): track decoded address prefixes 2026-04-04 22:46:12 +00:00
wire feat(wire): add alias entry readers + AX usage-example comments 2026-04-05 08:46:54 +01:00
.gitignore refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
chain_commands.go refactor(ax): make chain sync logging explicit 2026-04-04 21:03:36 +00:00
CLAUDE.md refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
commands_test.go fix(cli): tighten chain command validation 2026-04-04 20:22:48 +00:00
explorer_command.go refactor(ax): make chain sync logging explicit 2026-04-04 21:03:36 +00:00
go.mod refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
go.sum refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
README.md refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
sync_command.go refactor(ax): make chain sync logging explicit 2026-04-04 21:03:36 +00:00
sync_loop.go refactor(ax): make chain sync logging explicit 2026-04-04 21:03:36 +00:00

go-blockchain

Pure Go implementation of the Lethean blockchain protocol. Provides chain configuration, core cryptographic data types, CryptoNote wire serialisation, and LWMA difficulty adjustment for the Lethean CryptoNote/Zano-fork chain. Follows ADR-001: protocol logic in Go, cryptographic primitives deferred to a C++ bridge in later phases. Lineage: CryptoNote to IntenseCoin (2017) to Lethean to Zano rebase.

Module: dappco.re/go/core/blockchain Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import (
    "dappco.re/go/core/blockchain/config"
    "dappco.re/go/core/blockchain/types"
    "dappco.re/go/core/blockchain/wire"
    "dappco.re/go/core/blockchain/difficulty"
)

// Query the active hardfork version at a given block height
version := config.VersionAtHeight(config.MainnetForks, 10081) // returns HF2

// Check if a specific hardfork is active
active := config.IsHardForkActive(config.MainnetForks, config.HF4Zarcanum, 50000) // false

// Encode and decode a Lethean address
addr := &types.Address{SpendPublicKey: spendKey, ViewPublicKey: viewKey}
encoded := addr.Encode(config.AddressPrefix)
decoded, prefix, err := types.DecodeAddress(encoded)

// Varint encoding for the wire protocol
buf := wire.EncodeVarint(0x1eaf7)
val, n, err := wire.DecodeVarint(buf)

// Calculate next block difficulty
nextDiff := difficulty.NextDifficulty(timestamps, cumulativeDiffs, 120)

Documentation

Build & Test

go test ./...
go test -race ./...
go vet ./...
go build ./...

Licence

European Union Public Licence 1.2 -- see LICENCE for details.