GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - myneTEC/thor: A general purpose blockchain highly compatible with Ethereum's ecosystem

This repository was archived by the owner on Jun 25, 2025. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

3,394 Commits
3,394 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
abi
abi
 
 
api
api
 
 
bft
bft
 
 
block
block
 
 
builtin
builtin
 
 
cache
cache
 
 
chain
chain
 
 
cmd
cmd
 
 
co
co
 
 
comm
comm
 
 
consensus
consensus
 
 
genesis
genesis
 
 
kv
kv
 
 
logdb
logdb
 
 
lowrlp
lowrlp
 
 
metric
metric
 
 
muxdb
muxdb
 
 
p2psrv
p2psrv
 
 
packer
packer
 
 
poa
poa
 
 
runtime
runtime
 
 
stackedmap
stackedmap
 
 
state
state
 
 
thor
thor
 
 
tracers
tracers
 
 
trie
trie
 
 
tx
tx
 
 
txpool
txpool
 
 
vm
vm
 
 
vrf
vrf
 
 
xenv
xenv
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.golangci.yml
.golangci.yml
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
thorest.png
thorest.png
 
 

Repository files navigation

Vechain Thor

A general purpose blockchain highly compatible with Ethereum's ecosystem.

This is the first implementation written in golang.

Go Go Report Card GitHub Action Status License    TG

Table of contents

  • Installation
    • Requirements
    • Clone the repo
    • Building
  • Running Thor
    • Sub-commands
  • Docker
  • Explorers
  • Faucet
  • RESTful API
  • Acknowledgement
  • Contributing

Installation

Requirements

Thor requires Go 1.19+ and C compiler to build. To install Go, follow this link.

Clone the repo

Clone the Thor repo:

git clone https://github.com/vechain/thor.git
cd thor

To see a list of all available commands, run make help

Building

To build the main app thor, just run

make

or build the full suite:

make all

If no errors are reported, all built executable binaries will appear in folder bin.

Running Thor

Connect to Vechain's mainnet:

bin/thor --network main

Connect to Vechain's testnet:

bin/thor --network test

or startup a custom network

bin/thor --network <custom-net-genesis.json>

An example genesis config file can be found at genesis/example.json.

To show usages of all command line options:

bin/thor -h
Flag Description
--network The network to join (main|test) or path to the genesis file
--data-dir Directory for blockchain databases (default: "/Users/darren/Library/Application Support/org.vechain.thor")
--cache Megabytes of RAM allocated to trie nodes cache (default: 4096)
--beneficiary Address for block rewards
--target-gas-limit Target block gas limit (adaptive if set to 0) (default: 0)
--api-addr API service listening address (default: "localhost:8669")
--api-cors Comma-separated list of domains from which to accept cross-origin requests to API
--api-timeout API request timeout value in milliseconds (default: 10000)
--api-call-gas-limit Limit contract call gas (default: 50000000)
--api-backtrace-limit Limit the distance between 'position' and best block for subscriptions APIs (default: 1000)
--api-allow-custom-tracer Allow custom JS tracer to be used for the tracer API
--verbosity Log verbosity (0-9) (default: 3)
--max-peers Maximum number of P2P network peers (P2P network disabled if set to 0) (default: 25)
--p2p-port P2P network listening port (default: 11235)
--nat Port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
--bootnode Comma-separated list of bootnode IDs
--skip-logs Skip writing event|transfer logs (/logs API will be disabled)
--pprof Turn on go-pprof
--disable-pruner Disable state pruner to keep all history
--help, -h Show help
--version, -v Print the version

Sub-commands

  • solo client runs in solo mode for test & dev
# create new block when there is pending transaction
bin/thor solo --on-demand

# save blockchain data to disk(default to memory)
bin/thor solo --persist

# two options can work together
bin/thor solo --persist --on-demand
  • master-key master key management
# print the master address
bin/thor master-key

# export master key to keystore
bin/thor master-key --export > keystore.json


# import master key from keystore
cat keystore.json | bin/thor master-key --import

Docker

Docker is one quick way for running a vechain node:

docker run -d\
  -v {path-to-your-data-directory}/.org.vechain.thor:/home/thor/.org.vechain.thor\
  -p 127.0.0.1:8669:8669 -p 11235:11235 -p 11235:11235/udp\
  --name thor-node vechain/thor --network test

Do not forget to add the --api-addr 0.0.0.0:8669 flag if you want other containers and/or hosts to have access to the RESTful API. Thor binds to localhost by default and it will not accept requests outside the container itself without the flag.

Release v2.0.4 changed the default user from root (UID: 0) to thor (UID: 1000). Ensure that UID 1000 has rwx permissions on the data directory of the docker host. You can do that with ACL sudo setfacl -R -m u:1000:rwx {path-to-your-data-directory}, or update ownership with sudo chown -R 1000:1000 {path-to-your-data-directory}.

Docker Compose

A docker-compose.yml file is provided for convenience. It will create a container with the same configuration as the command above.

version: '3.8.'

services:
  thor-node:
    image: vechain/thor
    container_name: thor-node
    command: --network test --api-addr 0.0.0.0:8669
    volumes:
      - thor-data:/home/thor
    ports:
      - "8669:8669"
      - "11235:11235"
      - "11235:11235/udp"

volumes:
  thor-data:

Explorers

  • Vechain Explorer (Official)
  • VechainStats
  • Insight

Testnet faucet

  • faucet.vecha.in by Vechain Foundation

API

Once thor has started, the online OpenAPI documentation can be accessed in your browser. e.g. http://localhost:8669/ by default.

Thorest

Acknowledgement

A special shout out to following projects:

  • Ethereum
  • Swagger
  • Stoplight Elements

Contributing

  • Please refer to CONTRIBUTING.md on how to contribute to this project.

License

Vechain Thor is licensed under the GNU Lesser General Public License v3.0, also included in LICENSE file in repository.

About

A general purpose blockchain highly compatible with Ethereum's ecosystem

Topics

blockchainethereumthor

Resources

Readme
LGPL-3.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.