avalanchego

package module
v1.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

README


SlideChain

Node implementation for the SlideChain protocol - a specialized blockchain platform for secure AI model snapshots and data provenance with advanced geometric encoding and Bitcoin anchoring.

Key Features

  • Geometric Encoding (Anastos Process): Transforms artifact hashes into normalized polygons in a 3D coordinate system
  • Temporal Chaining: Records snapshots along the Z-axis to represent time progression
  • Zero-Knowledge Proofs: Verify data integrity without revealing sensitive underlying details
  • Bitcoin Anchoring: Periodically records state to Bitcoin for enhanced security
  • Subchain Architecture: Companies can launch their own chains with parent chain anchoring

Installation

SlideChain is built as a fork of AvalancheGo, inheriting its lightweight and efficient design. The hardware requirements are modest, but may change as network usage increases.

The minimum recommended hardware specification for nodes connected to the primary SlideChain network is:

  • CPU: Equivalent of 8 AWS vCPU
  • RAM: 16 GiB
  • Storage: 1 TiB
    • Nodes running for very long periods of time or nodes with custom configurations may observe higher storage requirements.
  • OS: Ubuntu 22.04/24.04 or macOS >= 12
  • Network: Reliable IPv4 or IPv6 network connection, with an open public port.

If you plan to build SlideChain from source, you will also need the following software:

  • Go version >= 1.23.6
  • gcc
  • g++
  • Access to a Bitcoin node (for anchoring functionality)
Building From Source
Clone The Repository

Clone the SlideChain repository:

git clone git@github.com:slidechain/slidechain.git
cd slidechain

This will clone and checkout the master branch.

Building SlideChain

Build SlideChain by running the build script:

./scripts/build.sh

The slidechain binary is now in the build directory. To run:

./build/slidechain
Docker Install

Make sure Docker is installed on the machine - so commands like docker run etc. are available.

Building the Docker image of latest slidechain branch can be done by running:

./scripts/build_image.sh

To check the built image, run:

docker image ls

The image should be tagged as slidechain/slidechain:xxxxxxxx, where xxxxxxxx is the shortened commit of the SlideChain source it was built from. To run the SlideChain node, run:

docker run -ti -p 9650:9650 -p 9651:9651 slidechain/slidechain:xxxxxxxx /slidechain/build/slidechain

Running SlideChain

Connecting to MainChain

To connect to the SlideChain primary network, run:

./build/slidechain

You should see ASCII art and log messages as the node starts.

You can use Ctrl+C to kill the node.

Connecting to TestChain

To connect to the SlideChain test network, run:

./build/slidechain --network-id=testchain
Creating a Local TestChain

To start a local test network:

./build/slidechain --network-id=local --staking-enabled=false --db-type=memdb

Setting Up Bitcoin Anchoring

SlideChain requires connection to a Bitcoin node for anchoring functionality:

  1. Configure Bitcoin connection in slidechain-config.json:
{
    "bitcoin": {
        "rpcHost": "localhost",
        "rpcPort": 8332,
        "rpcUser": "bitcoin",
        "rpcPassword": "password",
        "useTestnet": true,
        "requiredSignatures": 3,
        "publicKeys": [
            "PUBLIC_KEY_1",
            "PUBLIC_KEY_2",
            "PUBLIC_KEY_3"
        ]
    }
}
  1. Run SlideChain with the Bitcoin configuration:
./build/slidechain --config=slidechain-config.json

Creating Your Own Subchain

Companies can create their own SlideChain subchains:

  1. Create a subchain genesis file:
{
    "networkID": 12345,
    "chainName": "MyCompany SlideChain",
    "vmID": "slidevm",
    "slidechain": {
        "companyIdentifier": "MyCompany",
        "initialArtifacts": [
            "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
            "0x9876543210abcdef9876543210abcdef9876543210abcdef9876543210abcdef"
        ]
    }
}
  1. Register your subchain with the primary SlideChain:
curl -X POST --data '{
    "jsonrpc": "2.0",
    "method": "slidevm.registerSubchain",
    "params": {
        "genesisBlockHash": "HASH_OF_YOUR_GENESIS_BLOCK",
        "subchainName": "MyCompany SlideChain",
        "ownerID": "MyCompany-identifier"
    },
    "id": 1
}' -H 'content-type:application/json;' http://localhost:9650/ext/bc/slidechain

API Reference

SlideChain offers a comprehensive API for interacting with the protocol:

  • /submit-artifacts: Submit artifact hashes to create a new snapshot
  • /register-subchain: Register a new subchain with SlideChain
  • /spanoroot/:id: Get the latest SpanoRoot for a specific chain ID
  • /bitcoin-anchors/:id: Get Bitcoin anchoring details for a chain ID
  • /polygon/:id/:timestep: Get the polygon data for a specific chain at a specific time step
  • /verify-zkp: Verify a zero-knowledge proof for a SpanoRoot

For a complete API reference, see the SlideChain API Documentation.

Versioning

Version Semantics

SlideChain follows semantic versioning:

  • v0.x.x indicates a development version.
  • v1.x.x indicates a production version.
  • vx.[Upgrade].x indicates the number of network upgrades that have occurred.
  • vx.x.[Patch] indicates the number of client upgrades since the last network upgrade.

Supported Platforms

SlideChain currently supports the following platforms:

Architecture Operating system Support tier
amd64 Linux 1
arm64 Linux 2
amd64 Darwin 2
amd64 Windows 3

Security Bugs

We welcome responsible disclosures.

Please refer to our Security Policy and Security Advisories.

White Paper

For a detailed explanation of SlideChain's cryptographic foundations, geometric encoding (Anastos Process), and Bitcoin anchoring mechanisms, please refer to our white paper.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
atomic/atomicmock
Package atomicmock is a generated GoMock package.
Package atomicmock is a generated GoMock package.
codecmock
Package codecmock is a generated GoMock package.
Package codecmock is a generated GoMock package.
codectest
Package codectest provides a test suite for testing codec implementations.
Package codectest provides a test suite for testing codec implementations.
databasemock
Package databasemock is a generated GoMock package.
Package databasemock is a generated GoMock package.
ids
idstest
Package codectest provides a test suite for testing functionality related to IDs.
Package codectest provides a test suite for testing functionality related to IDs.
messagemock
Package messagemock is a generated GoMock package.
Package messagemock is a generated GoMock package.
p2p
plugins
slidevm
plugins/slidevm/main.go
plugins/slidevm/main.go
proto
consensus/snowman/snowmanmock
Package snowmanmock is a generated GoMock package.
Package snowmanmock is a generated GoMock package.
engine/avalanche/state
Package state manages the meta-data required by consensus for an avalanche dag.
Package state manages the meta-data required by consensus for an avalanche dag.
engine/avalanche/vertex/vertexmock
Package vertexmock is a generated GoMock package.
Package vertexmock is a generated GoMock package.
engine/common/commonmock
Package commonmock is a generated GoMock package.
Package commonmock is a generated GoMock package.
engine/snowman/block/blockmock
Package blockmock is a generated GoMock package.
Package blockmock is a generated GoMock package.
engine/snowman/job
Package job provides a Scheduler to manage and execute Jobs with dependencies.
Package job provides a Scheduler to manage and execute Jobs with dependencies.
networking/handler/handlermock
Package handlermock is a generated GoMock package.
Package handlermock is a generated GoMock package.
networking/router/routermock
Package routermock is a generated GoMock package.
Package routermock is a generated GoMock package.
networking/sender/sendermock
Package sendermock is a generated GoMock package.
Package sendermock is a generated GoMock package.
networking/timeout/timeoutmock
Package timeoutmock is a generated GoMock package.
Package timeoutmock is a generated GoMock package.
networking/tracker/trackermock
Package trackermock is a generated GoMock package.
Package trackermock is a generated GoMock package.
uptime/uptimemock
Package uptimemock is a generated GoMock package.
Package uptimemock is a generated GoMock package.
validators/validatorsmock
Package validatorsmock is a generated GoMock package.
Package validatorsmock is a generated GoMock package.
e2e
e2e/banff
Implements tests for the banff network upgrade.
Implements tests for the banff network upgrade.
e2e/c
AUTOMATICALLY GENERATED.
AUTOMATICALLY GENERATED.
e2e/x/transfer
Implements X-chain transfer tests.
Implements X-chain transfer tests.
bag
crypto/keychain/keychainmock
Package keychainmock is a generated GoMock package.
Package keychainmock is a generated GoMock package.
filesystem/filesystemmock
Package filesystemmock is a generated GoMock package.
Package filesystemmock is a generated GoMock package.
hashing/hashingmock
Package hashingmock is a generated GoMock package.
Package hashingmock is a generated GoMock package.
ips
resource/resourcemock
Package resourcemock is a generated GoMock package.
Package resourcemock is a generated GoMock package.
rpc
set
vms
avm
avm/block
Package block is a generated GoMock package.
Package block is a generated GoMock package.
avm/block/executor/executormock
Package executormock is a generated GoMock package.
Package executormock is a generated GoMock package.
avm/metrics/metricsmock
Package metricsmock is a generated GoMock package.
Package metricsmock is a generated GoMock package.
avm/state/statemock
Package statemock is a generated GoMock package.
Package statemock is a generated GoMock package.
avm/txs/txsmock
Package txsmock is a generated GoMock package.
Package txsmock is a generated GoMock package.
components/avax/avaxmock
Package avaxmock is a generated GoMock package.
Package avaxmock is a generated GoMock package.
components/gas
The gas package implements dynamic gas pricing specified in ACP-103: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/103-dynamic-fees
The gas package implements dynamic gas pricing specified in ACP-103: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/103-dynamic-fees
components/verify/verifymock
Package verifymock is a generated GoMock package.
Package verifymock is a generated GoMock package.
fx
platformvm/block
Package block is a generated GoMock package.
Package block is a generated GoMock package.
platformvm/block/executor/executormock
Package executormock is a generated GoMock package.
Package executormock is a generated GoMock package.
platformvm/fx/fxmock
Package fxmock is a generated GoMock package.
Package fxmock is a generated GoMock package.
platformvm/signer/signermock
Package signermock is a generated GoMock package.
Package signermock is a generated GoMock package.
platformvm/state
Package state is a generated GoMock package.
Package state is a generated GoMock package.
platformvm/txs/fee
TODO: Before Etna, address all TODOs in this package and ensure ACP-103 compliance.
TODO: Before Etna, address all TODOs in this package and ensure ACP-103 compliance.
platformvm/utxo/utxomock
Package utxomock is a generated GoMock package.
Package utxomock is a generated GoMock package.
proposervm/proposer/proposermock
Package proposermock is a generated GoMock package.
Package proposermock is a generated GoMock package.
proposervm/scheduler/schedulermock
Package schedulermock is a generated GoMock package.
Package schedulermock is a generated GoMock package.
registry/registrymock
Package registrymock is a generated GoMock package.
Package registrymock is a generated GoMock package.
slidevm
In vms/slidevm/plugin.go
In vms/slidevm/plugin.go
vmsmock
Package vmsmock is a generated GoMock package.
Package vmsmock is a generated GoMock package.
wallet
x

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL