No description
Find a file
Claude caf13a1937
feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction
- wire: add readExtraAliasEntry (tag 33) + readExtraAliasEntryOld (tag 20)
  Unblocks HF4+ Zarcanum transaction deserialization
- chain: alias extraction from transaction extra fields (14/14 on testnet)
- chain: alias storage and retrieval via go-store
- daemon: JSON-RPC server (getinfo, getheight, getblockheaderbyheight,
  getlastblockheader, get_all_alias_details, get_alias_details)
- cmd: `chain serve` — sync from seed + serve RPC simultaneously
- cmd: `wallet create` — generate keys, iTHN address, 24-word seed
- cmd: `wallet address` — show base58-encoded iTHN address
- cmd: `wallet seed` — show mnemonic seed phrase
- cmd: `wallet scan` — scan chain for owned outputs via ECDH derivation

Tested: 11,263 blocks synced in 3m11s from live testnet. All HF0-HF4
validated. 14 aliases extracted. RPC serves correct heights, difficulties,
block headers, and alias data. Wallet generates valid iTHN addresses.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 00:33:12 +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(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
cmd/core-chain feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
config fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
consensus fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
crypto fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
daemon feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
difficulty fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
docs refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
mining fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
p2p fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
rpc fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
testdata feat(consensus): V2 Zarcanum signature and proof verification 2026-02-22 00:06:10 +00:00
tui fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
types fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
wallet fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
wire feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
.gitignore feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
CLAUDE.md refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
cmd_explorer.go fix(blockchain): upgrade to core v0.8.0-alpha.1 + replace banned imports 2026-03-26 14:10:18 +00:00
cmd_serve.go feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
cmd_sync.go fix(blockchain): upgrade to core v0.8.0-alpha.1 + replace banned imports 2026-03-26 14:10:18 +00:00
cmd_wallet.go feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
commands.go feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction 2026-04-02 00:33:12 +01:00
commands_test.go fix(blockchain): complete AX v0.8.0 polish pass 2026-03-26 16:58:23 +00:00
go.mod fix(blockchain): upgrade to core v0.8.0-alpha.1 + replace banned imports 2026-03-26 14:10:18 +00:00
go.sum fix(blockchain): upgrade to core v0.8.0-alpha.1 + replace banned imports 2026-03-26 14:10:18 +00:00
README.md refactor: migrate module path to dappco.re/go/core/blockchain 2026-03-22 01:49:26 +00:00
sync_service.go fix(blockchain): upgrade to core v0.8.0-alpha.1 + replace banned imports 2026-03-26 14:10:18 +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.