Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
98493f3
Create Dockerfile
faddat Aug 17, 2021
08b1f7e
Create docker.yml
faddat Aug 17, 2021
311c13f
Update docker.yml
faddat Aug 17, 2021
7cbe76e
Update Dockerfile
faddat Aug 17, 2021
ad9df28
Update Dockerfile
faddat Aug 17, 2021
a2451e8
Update docker.yml
faddat Aug 17, 2021
548c517
Update docker.yml
faddat Aug 17, 2021
5b1d2f9
Update docker.yml
faddat Aug 17, 2021
1aac8df
Update docker.yml
faddat Aug 18, 2021
d05410f
Update docker.yml
faddat Aug 18, 2021
f37df1e
Update docker.yml
faddat Aug 18, 2021
021b081
Update start.go
faddat Aug 18, 2021
8efb052
change default outbound
faddat Aug 18, 2021
0287dd9
takes a slice of seed addresses as a flag. Chain ID can be used as a…
faddat Aug 18, 2021
b01a0e6
add more osmo seeds
faddat Aug 18, 2021
1136ca8
Update docker.yml
faddat Aug 18, 2021
260f744
Update docker.yml
faddat Aug 18, 2021
00682b0
Update README.md
faddat Aug 18, 2021
5f74dfe
Update README.md
faddat Aug 18, 2021
b8d36b4
fix flags
faddat Aug 18, 2021
253a7df
Merge branch 'master' of https://github.com/notional-labs/tenderseed
faddat Aug 18, 2021
05bbf51
Update README.md
faddat Aug 18, 2021
7055f78
Merge branch 'binaryholdings:master' into master
faddat Aug 18, 2021
3cba11c
Merge branch 'binaryholdings:master' into master
faddat Sep 1, 2021
ae6c5eb
Update Dockerfile
faddat Sep 1, 2021
3948f7f
change args handler
catShaark Sep 1, 2021
bdba132
change args handler
catShaark Sep 2, 2021
942afe0
Merge pull request #1 from notional-labs/test
faddat Sep 2, 2021
e7a32b4
some adjustment
catShaark Sep 2, 2021
8dc72e3
So, we noticed that our tenderseed had... we'd made some mistakes. T…
faddat Oct 22, 2021
5bda608
add makefile
catShaark Oct 22, 2021
eb34829
capitlize config env var
catShaark Oct 22, 2021
7f270eb
capitalize config env var
catShaark Oct 22, 2021
ffef996
Update README.md
catShaark Oct 23, 2021
7e9243f
Update README.md
catShaark Oct 23, 2021
3526c91
Update README.md
catShaark Oct 23, 2021
6ed2ae3
Merge pull request #4 from binaryholdings/master
faddat Oct 24, 2021
8a7d2c7
bump
faddat Oct 24, 2021
a559f31
Merge remote-tracking branch 'origin/test'
faddat Oct 24, 2021
44fdf26
Demonstration of an API reduction for single task software
faddat Oct 24, 2021
0e31d40
dockerfile refactor to use arch and scope reduction
faddat Oct 24, 2021
85756aa
dockerfile refactor & scope reduction
faddat Oct 24, 2021
9bf8bb0
single-file Go app with main.go where God intended it to be
faddat Oct 24, 2021
bc3e34f
This is now a simple go app and we can make it configurable per the t…
faddat Oct 24, 2021
9be449e
Tenderseed -> TinySeed
faddat Oct 24, 2021
0608123
Further scope reduction
faddat Oct 24, 2021
9bdbfb6
update readme
faddat Oct 24, 2021
eae3597
Finishing touches...
faddat Oct 24, 2021
67cc011
TinySeed is nearly complete
faddat Oct 24, 2021
6c9d669
Tinyseed
faddat Oct 24, 2021
e89f5b0
Delete config directory
faddat Oct 24, 2021
30b2760
Delete data directory
faddat Oct 24, 2021
e7ffb31
Update dockerfile so that it works
faddat Oct 25, 2021
8c6ff63
Merge branch 'minimalism' of https://github.com/notional-labs/tenders…
faddat Oct 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build
tenderseed
.idea
28 changes: 9 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
FROM golang:1.15.5-alpine3.12 as builder
FROM faddat/archlinux AS builder

# Set workdir
WORKDIR /sources
COPY . /tinyseed

# Add source files
COPY . .

# Install minimum necessary dependencies
RUN apk add --no-cache make gcc libc-dev
ENV PATH $PATH:/root/go/bin
ENV GOPATH /root/go/

RUN make build
RUN pacman -Syyu --noconfirm go base-devel

# ----------------------------

FROM alpine:3.12
RUN cd /tinyseed && go install ./...

COPY --from=builder /sources/build/ /usr/local/bin/
FROM faddat/archlinux

RUN addgroup tendermint && adduser -S -G tendermint tendermint -h /data
COPY --from=builder /root/go/bin/tinyseed /usr/bin/tinyseed

USER tendermint

WORKDIR /data

EXPOSE 26656

ENTRYPOINT ["tenderseed", "start"]
CMD tinyseed
25 changes: 0 additions & 25 deletions Makefile

This file was deleted.

81 changes: 22 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,43 @@
# TenderSeed
# TinySeed

## This is a fork of polychainlabs tenderseed repo
## This is a fork of Binary Holding's Tenderseed, which is a fork of Polychain's Tenderseed

A lightweight seed node for a Tendermint p2p network.
Familiarity with [Tendermint network operation](https://tendermint.com/docs/tendermint-core/using-tendermint.html) is **NOT** a pre-requisite to understanding how to use TinySeed.

Seed nodes maintain an address book of active peers on a Tendermint p2p network. New nodes can dial known seeds and request lists of active peers for establishing p2p connections.
To make it easier to use in Docker on Aakash, everything else has been given a default value.

This project implements a lightweight seed node. The lightweight node maintains an address book of active peers, but **does not** relay or store blocks or transactions.
If you do nothing, eg:

Familiarity with [Tendermint network operation](https://tendermint.com/docs/tendermint-core/using-tendermint.html) is a pre-requisite to understanding how to use TenderSeed.

## Quickstart

Build with `make` and start a seed node with the `start` command.

**This will run with defaults and seed/crawl Osmosis**
```bash
tenderseed start
git clone https://github.com/notional-labs/tinyseed
go mod tidy
go install .
tenderseed
```

**This will seed/crawl cosmoshub-4**
Theyn you'll become a seed node on Osmosis-1. Let's do Cosmoshub-4, shall we? We've made Osmosis zeroconf, but hey this thing here reads 2 env vars!

```bash
tenderseed -seed=bf8328b66dceb4987e5cd94430af66045e59899f@public-seed.cosmos.vitwit.com:26656,[email protected]:26656,[email protected]:26656,ba3bacc714817218562f743178228f23678b2873@public-seed-node.cosmoshub.certus.one:26656,[email protected]:26656,[email protected]:26656 -chain-id cosmoshub-4 start
export ID=cosmoshub-4
export SEEDS=bf8328b66dceb4987e5cd94430af66045e59899f@public-seed.cosmos.vitwit.com:26656,[email protected]:26656,[email protected]:26656,ba3bacc714817218562f743178228f23678b2873@public-seed-node.cosmoshub.certus.one:26656,[email protected]:26656,[email protected]:26656
git clone https://github.com/notional-labs/tinyseed
go mod tidy
go install .
tenderseed
```

To view your node id (you will need this for other nodes to connect), invoke the `show-node-id` command.

> The first run of Tenderseed will generate a node key if one does not exist.

```shell
$ tenderseed show-node-id
```

## Home Dir

All TenderSeed configuration and address book data is stored in the TenderSeed home directory.
## Quickstart

The default path is `$HOME/.tenderseed` but you can specify your own path via the `--home` command line argument.
Build with `make` and start a seed node with the `start` command.

```shell
tenderseed --home /some/path/to/home/dir
**This will run with defaults and seed/crawl Osmosis**
```bash
tenderseed start
```

> The default configuration stores the node key in a `config` folder and the address book in a `data` folder within the home folder.

## Configuration

TenderSeed is configured by a [toml](https://github.com/toml-lang/toml) config file found in the tenderseed [home dir](#Home-Dir) as `config/config.toml`

The seed is configured via a [toml](https://github.com/toml-lang/toml) config file. The default configuration file is shown below.

> A first run of Tenderseed will generate a default configuration if one does not exist.

```toml
# path to address book (relative to tendermint-seed home directory or an absolute path)
addr_book_file = "data/addrbook.json"

# Set true for strict routability rules
# Set false for private or local networks
addr_book_strict = true

# network identifier (todo move to cli flag argument? keeps the config network agnostic)
chain_id = "some-chain-id"

# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:26656"

# maximum number of inbound connections
max_num_inbound_peers = 1000

# maximum number of outbound connections
max_num_outbound_peers = 10

# path to node_key (relative to tendermint-seed home directory or an absolute path)
node_key_file = "config/node_key.json"
```

## License

Expand Down
74 changes: 0 additions & 74 deletions cmd/tenderseed/main.go

This file was deleted.

48 changes: 43 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
module github.com/binaryholdings/tenderseed
go 1.17

module github.com/notional-labs/tinyseed

require (
github.com/google/subcommands v1.0.1
github.com/mitchellh/go-homedir v1.1.0
github.com/pelletier/go-toml v1.6.0
github.com/tendermint/tendermint v0.34.11
github.com/tendermint/tendermint v0.34.14
)

go 1.16
require (
github.com/aead/siphash v1.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
github.com/btcsuite/goleveldb v1.0.0 // indirect
github.com/btcsuite/snappy-go v1.0.0 // indirect
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
github.com/btcsuite/winsvc v1.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/lru v1.0.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jrick/logrotate v1.0.0 // indirect
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20211020060615-d418f374d309 // indirect
golang.org/x/sys v0.0.0-20211023085530-d6a326fbbf70 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)
Loading