├── contrib ├── docker │ └── config.json ├── blacklist.yaml ├── stop.sh ├── nearkey ├── start.sh ├── mainnet.yaml ├── testnet.yaml ├── nginx │ ├── mainnet │ │ └── endpoint.conf │ └── testnet │ │ └── endpoint.conf ├── nearkey.go ├── setup.sh ├── docker-compose.yaml-mainnet └── docker-compose.yaml-testnet ├── README.md ├── setup.sh └── LICENSE /contrib/docker/config.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /contrib/blacklist.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | IPs: 3 | EOAs: 4 | CAs: 5 | -------------------------------------------------------------------------------- /contrib/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -f docker-compose.yaml down 4 | -------------------------------------------------------------------------------- /contrib/nearkey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aurora-is-near/partner-relayer-deploy/HEAD/contrib/nearkey -------------------------------------------------------------------------------- /contrib/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -f docker-compose.yaml up --scale endpoint=6 --remove-orphans -d 4 | -------------------------------------------------------------------------------- /contrib/mainnet.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | port: 8545 3 | database: postgres://aurora:aurora@10.123.45.253/aurora 4 | network: mainnet 5 | endpoint: http://10.123.45.251:3030/ 6 | engine: aurora 7 | signer: %%SIGNER%% 8 | signerKeys: 9 | - config/relayer.json 10 | writable: false 11 | -------------------------------------------------------------------------------- /contrib/testnet.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | port: 8545 3 | database: postgres://aurora:aurora@10.123.46.253/aurora 4 | network: testnet 5 | endpoint: http://10.123.46.251:3030/ 6 | engine: aurora 7 | signer: %%SIGNER%% 8 | signerKeys: 9 | - config/relayer.json 10 | writable: false 11 | -------------------------------------------------------------------------------- /contrib/nginx/mainnet/endpoint.conf: -------------------------------------------------------------------------------- 1 | upstream endpoint { 2 | server 10.123.45.2:8545; 3 | server 10.123.45.3:8545; 4 | server 10.123.45.4:8545; 5 | server 10.123.45.5:8545; 6 | server 10.123.45.6:8545; 7 | } 8 | 9 | server { 10 | listen *:80; 11 | 12 | location / { 13 | client_body_buffer_size 64k; 14 | proxy_pass http://endpoint; 15 | proxy_set_header Host $host; 16 | proxy_set_header X-Real-IP $remote_addr; 17 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 18 | proxy_set_header X-Forwarded-Proto $scheme; 19 | proxy_http_version 1.1; 20 | proxy_set_header Upgrade $http_upgrade; 21 | proxy_set_header Connection "Upgrade"; 22 | proxy_socket_keepalive on; 23 | nchan_websocket_ping_interval 5; 24 | nchan_websocket_client_heartbeat PING PONG; 25 | proxy_read_timeout 360000s; 26 | proxy_send_timeout 360000s; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /contrib/nginx/testnet/endpoint.conf: -------------------------------------------------------------------------------- 1 | upstream endpoint { 2 | server 10.123.46.2:8545; 3 | server 10.123.46.3:8545; 4 | server 10.123.46.4:8545; 5 | server 10.123.46.5:8545; 6 | server 10.123.46.6:8545; 7 | } 8 | 9 | server { 10 | listen *:80; 11 | 12 | location / { 13 | client_body_buffer_size 64k; 14 | proxy_pass http://endpoint; 15 | proxy_set_header Host $host; 16 | proxy_set_header X-Real-IP $remote_addr; 17 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 18 | proxy_set_header X-Forwarded-Proto $scheme; 19 | proxy_http_version 1.1; 20 | proxy_set_header Upgrade $http_upgrade; 21 | proxy_set_header Connection "Upgrade"; 22 | proxy_socket_keepalive on; 23 | nchan_websocket_ping_interval 5; 24 | nchan_websocket_client_heartbeat PING PONG; 25 | proxy_read_timeout 360000s; 26 | proxy_send_timeout 360000s; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /contrib/nearkey.go: -------------------------------------------------------------------------------- 1 | // Package main generates a near node/account/validator key. 2 | package main 3 | 4 | import ( 5 | "crypto/ed25519" 6 | "crypto/rand" 7 | "encoding/hex" 8 | "encoding/json" 9 | "fmt" 10 | "io" 11 | "math/big" 12 | "os" 13 | "strings" 14 | ) 15 | 16 | const ( 17 | prefix = "ed25519:" 18 | alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" 19 | alphabetIdx0 = '1' 20 | ) 21 | 22 | var bigRadix = big.NewInt(58) 23 | var bigZero = big.NewInt(0) 24 | 25 | // encode encodes a byte slice to a modified base58 string. Lifted from github.com/btcsuite/btcutil/base58. 26 | func encode58(b []byte) string { 27 | x := new(big.Int) 28 | x.SetBytes(b) 29 | 30 | answer := make([]byte, 0, len(b)*136/100) 31 | for x.Cmp(bigZero) > 0 { 32 | mod := new(big.Int) 33 | x.DivMod(x, bigRadix, mod) 34 | answer = append(answer, alphabet[mod.Int64()]) 35 | } 36 | 37 | // leading zero bytes 38 | for _, i := range b { 39 | if i != 0 { 40 | break 41 | } 42 | answer = append(answer, alphabetIdx0) 43 | } 44 | 45 | // reverse 46 | alen := len(answer) 47 | for i := 0; i < alen/2; i++ { 48 | answer[i], answer[alen-1-i] = answer[alen-1-i], answer[i] 49 | } 50 | 51 | return string(answer) 52 | } 53 | 54 | type KeyFile struct { 55 | AccountID string `json:"account_id"` 56 | PublicKey string `json:"public_key"` 57 | SecretKey string `json:"secret_key"` 58 | } 59 | 60 | func newKey(accountid string) string { 61 | pub, priv, err := ed25519.GenerateKey(rand.Reader) 62 | if err != nil { 63 | panic(err) // This should never occur. 64 | } 65 | kf := &KeyFile{ 66 | AccountID: accountid, 67 | PublicKey: prefix + encode58(pub), 68 | SecretKey: prefix + encode58(priv), 69 | } 70 | d, err := json.MarshalIndent(kf, "", " ") 71 | if err != nil { 72 | panic(err) // This should never occur. 73 | } 74 | return string(d) 75 | } 76 | 77 | func randID() string { 78 | d := make([]byte, 8) 79 | if _, err := io.ReadFull(rand.Reader, d); err != nil { 80 | panic(err) // Should never happen 81 | } 82 | return hex.EncodeToString(d) 83 | } 84 | 85 | func addRandToAccountID(accountid string) string { 86 | return strings.Replace(accountid, "%", randID(), 1) 87 | } 88 | 89 | func main() { 90 | var accountID string 91 | if len(os.Args) > 1 { 92 | accountID = addRandToAccountID(os.Args[1]) 93 | } 94 | fmt.Fprint(os.Stdout, newKey(accountID)) 95 | os.Exit(0) 96 | } 97 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Aurora Relayer & Near Core on mainnet 2 | ===================================== 3 | 4 | Requirements: docker, docker-compose, curl. x64-64 architecture. 5 | 6 | 1. Run `$ ./setup.sh`. Wait until it finishes with "Setup Complete". This can take hours due to the volume of data to download. 7 | 2. Enjoy 8 | 9 | Testnet 10 | ======= 11 | 12 | Run `$ ./setup.sh testnet` to install a testnet instead of mainnet release. 13 | 14 | Starting & Stopping 15 | =================== 16 | 17 | When running `./setup.sh` you should end up with a running node that is catching up with the network. 18 | You can always stop and start the node by executing the `./stop.sh` or `./start.sh` command. 19 | 20 | 21 | Write transactions & custom signers 22 | =================================== 23 | 24 | The default installation does not support write transactions. Instead it disables writing and sets up a placeholder key. 25 | 26 | To enable write transactions, you need to: 27 | 28 | - Create an account on testnet/mainnet and load some NEAR on it. 29 | - Export the account's keypair and name into config/relayer.json (check the original file for format). 30 | - Change the `signer` entry in the config/testnet.yaml or config/mainnet.yaml to the account's name. 31 | - Set writable:true in config/testnet.yaml or config/mainnet.yaml. 32 | - Restart the endpoint container. 33 | 34 | Updates 35 | ======= 36 | 37 | The software in this installation is updated automatically. Whenever Aurora releases a new image, it will be 38 | downloaded, and the component restarted. 39 | 40 | This is however not true for the included database and chain files. These are only downloaded initially when 41 | running `./setup.sh`. Keep your node running to prevent going out of sync. 42 | 43 | Finding RPC endpoint 44 | ==================== 45 | 46 | The RPC endpoint is at http://127.0.0.1:10080/ as well as on the public IPs of your computer. 47 | 48 | Good to know 49 | ============ 50 | 51 | - You can change the setup of the nginx reverse proxy by editing the contrib/nginx//endpoint.conf files. Restart the node afterwards. 52 | - You can prevent listening on the public IP by modifying the docker-compose.yaml file. See embedded comments. 53 | 54 | 55 | Changes 56 | ======= 57 | 58 | v2.0 59 | 60 | - Change naming scheme for docker images to make reuse easier. 61 | - Add scaling of endpoints for better performance. 62 | - Add reverse proxy for easier deployment and more stable operations. 63 | - Add automatic update functionality. 64 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | network=${1:-"mainnet"} 4 | namePostfix="near" 5 | 6 | if [ "${network}" = "testnet" ]; then 7 | namePostfix="testnet" 8 | fi 9 | 10 | 11 | if [ ! -d ./contrib ]; then 12 | echo "Run ./setup.sh from original git repository only!" 13 | exit 1 14 | fi 15 | 16 | mkdir near config database 2> /dev/null 17 | mkdir near/data 2> /dev/null 18 | 19 | 20 | if [ ! -f ./near/config.json ]; then 21 | echo Downloading default configuration. 22 | curl -sSf -o ./near/config.json https://files.deploy.aurora.dev/"${network}"/config.json 23 | fi 24 | 25 | if [ ! -f ./near/genesis.json ]; then 26 | echo Downloading genesis file. 27 | curl -sSf -o ./near/genesis.json.gz https://files.deploy.aurora.dev/"${network}"/genesis.json.gz 28 | echo Uncompressing genesis file. 29 | gzip -d ./near/genesis.json.gz 30 | fi 31 | 32 | if [ ! -f ./near/node_key.json ]; then 33 | echo Generating node_key. 34 | ./contrib/nearkey node%."${namePostfix}" > ./near/node_key.json 35 | fi 36 | 37 | if [ ! -f ./near/validator_key.json ]; then 38 | echo Generating validator_key. 39 | ./contrib/nearkey node%."${namePostfix}" > ./near/validator_key.json 40 | fi 41 | 42 | if [ ! -f ./config/relayer.json ]; then 43 | echo Generating relayer key. 44 | ./contrib/nearkey relayer%."${namePostfix}" > ./config/relayer.json 45 | relayerName=$(cat ./config/relayer.json | grep account_id | cut -d\" -f4) 46 | sed "s/%%SIGNER%%/${relayerName}/" contrib/"${network}".yaml > ./config/"${network}".yaml 47 | fi 48 | 49 | if [ ! -f ./config/blacklist.yaml ]; then 50 | cp ./contrib/blacklist.yaml ./config/blacklist.yaml 51 | fi 52 | 53 | if [ -f ./near/data/CURRENT -a -f ./database/.version ]; then 54 | echo Setup complete 55 | fi 56 | 57 | 58 | latest="" 59 | if [ ! -f .latest ]; then 60 | echo Initial 61 | latest=$(curl -sSf https://snapshots.deploy.aurora.dev/snapshots/"${network}"-latest) 62 | echo "${latest}" > ".latest" 63 | fi 64 | latest=$(cat ".latest") 65 | 66 | if [ ! -f ./database/.version ]; then 67 | echo Downloading database snapshot ${latest} 68 | finish=0 69 | while [ ${finish} -eq 0 ]; do 70 | echo Fetching... this can take some time... 71 | curl -sSf https://snapshots.deploy.aurora.dev/158c1b69348fda67682197791/"${network}"-db-"${latest}"/data.tar?lastfile=$(tail -n1 "./database/.lastfile") | tar -xv -C ./database/ >> ./database/.lastfile 2> /dev/null 72 | if [ -f ./database/.version ]; then 73 | finish=1 74 | fi 75 | done 76 | fi 77 | 78 | if [ ! -f ./near/data/CURRENT ]; then 79 | echo Downloading near chain snapshot 80 | finish=0 81 | while [ ${finish} -eq 0 ]; do 82 | echo Fetching... this can take some time... 83 | docker run --init --rm --name snapshot_downloader -v `pwd`/near/:/home/near:rw --entrypoint /usr/local/bin/download_snapshot.sh nearaurora/nearcore-"${network}":latest 84 | if [ -f ./near/data/CURRENT ]; then 85 | finish=1 86 | fi 87 | done 88 | fi 89 | cp ./contrib/docker-compose.yaml-"${network}" docker-compose.yaml 90 | cp ./contrib/start.sh start.sh 91 | cp ./contrib/stop.sh stop.sh 92 | rm setup.sh 93 | echo Setup Complete 94 | ./start.sh 95 | -------------------------------------------------------------------------------- /contrib/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | network=${1:-"mainnet"} 4 | namePostfix="near" 5 | 6 | if [ "${network}" = "testnet" ]; then 7 | namePostfix="testnet" 8 | fi 9 | 10 | 11 | if [ ! -d ./contrib ]; then 12 | echo "Run ./setup.sh from original git repository only!" 13 | exit 1 14 | fi 15 | 16 | mkdir near config database 2> /dev/null 17 | mkdir near/data 2> /dev/null 18 | 19 | 20 | if [ ! -f ./near/config.json ]; then 21 | echo Downloading default configuration. 22 | curl -sSf -o ./near/config.json https://files.deploy.aurora.dev/"${network}"/config.json 23 | fi 24 | 25 | if [ ! -f ./near/genesis.json ]; then 26 | echo Downloading genesis file. 27 | curl -sSf -o ./near/genesis.json.gz https://files.deploy.aurora.dev/"${network}"/genesis.json.gz 28 | echo Uncompressing genesis file. 29 | gzip -d ./near/genesis.json.gz 30 | fi 31 | 32 | if [ ! -f ./near/node_key.json ]; then 33 | echo Generating node_key. 34 | ./contrib/nearkey node%."${namePostfix}" > ./near/node_key.json 35 | fi 36 | 37 | if [ ! -f ./near/validator_key.json ]; then 38 | echo Generating validator_key. 39 | ./contrib/nearkey node%."${namePostfix}" > ./near/validator_key.json 40 | fi 41 | 42 | if [ ! -f ./config/relayer.json ]; then 43 | echo Generating relayer key. 44 | ./contrib/nearkey relayer%."${namePostfix}" > ./config/relayer.json 45 | relayerName=$(cat ./config/relayer.json | grep account_id | cut -d\" -f4) 46 | sed "s/%%SIGNER%%/${relayerName}/" contrib/"${network}".yaml > ./config/"${network}".yaml 47 | fi 48 | 49 | if [ ! -f ./config/blacklist.yaml ]; then 50 | cp ./contrib/blacklist.yaml ./config/blacklist.yaml 51 | fi 52 | 53 | if [ -f ./near/data/CURRENT -a -f ./database/.version ]; then 54 | echo Setup complete 55 | fi 56 | 57 | 58 | latest="" 59 | if [ ! -f .latest ]; then 60 | echo Initial 61 | latest=$(curl -sSf https://snapshots.deploy.aurora.dev/snapshots/"${network}"-latest) 62 | echo "${latest}" > ".latest" 63 | fi 64 | latest=$(cat ".latest") 65 | 66 | if [ ! -f ./database/.version ]; then 67 | echo Downloading database snapshot ${latest} 68 | finish=0 69 | while [ ${finish} -eq 0 ]; do 70 | echo Fetching... this can take some time... 71 | curl -sSf https://snapshots.deploy.aurora.dev/158c1b69348fda67682197791/"${network}"-db-"${latest}"/data.tar?lastfile=$(tail -n1 "./database/.lastfile") | tar -xv -C ./database/ >> ./database/.lastfile 2> /dev/null 72 | if [ -f ./database/.version ]; then 73 | finish=1 74 | fi 75 | done 76 | fi 77 | 78 | if [ ! -f ./near/data/CURRENT ]; then 79 | echo Downloading near chain snapshot 80 | finish=0 81 | while [ ${finish} -eq 0 ]; do 82 | echo Fetching... this can take some time... 83 | docker run --init --rm --name snapshot_downloader -v `pwd`/near/:/home/near:rw --entrypoint /usr/local/bin/download_snapshot.sh nearaurora/nearcore-"${network}":latest 84 | if [ -f ./near/data/CURRENT ]; then 85 | finish=1 86 | fi 87 | done 88 | fi 89 | cp ./contrib/docker-compose.yaml-"${network}" docker-compose.yaml 90 | cp ./contrib/start.sh start.sh 91 | cp ./contrib/stop.sh stop.sh 92 | rm setup.sh 93 | echo Setup Complete 94 | ./start.sh 95 | -------------------------------------------------------------------------------- /contrib/docker-compose.yaml-mainnet: -------------------------------------------------------------------------------- 1 | --- 2 | version: '3.8' 3 | services: 4 | database: 5 | container_name: mainnet_database 6 | image: nearaurora/database-mainnet:latest 7 | restart: unless-stopped 8 | ports: 9 | - '127.0.0.1:15432:5432' 10 | volumes: 11 | - ./database:/var/lib/postgresql/data 12 | networks: 13 | static-network: 14 | ipv4_address: 10.123.45.253 15 | indexer: 16 | container_name: mainnet_indexer 17 | image: nearaurora/endpoint-mainnet:latest 18 | restart: unless-stopped 19 | init: true 20 | depends_on: 21 | - database 22 | environment: 23 | - NEAR_ENV=mainnet 24 | - NODE_ENV=mainnet 25 | volumes: 26 | - ./config:/srv/aurora/relayer/config 27 | extra_hosts: 28 | - host.docker.internal:host-gateway # See: https://stackoverflow.com/a/43541732 29 | entrypoint: ["sh", "-c", "util/indexer/indexer | node lib/indexer_backend.js"] 30 | networks: 31 | static-network: 32 | ipv4_address: 10.123.45.252 33 | nearcore: 34 | container_name: mainnet_nearcore 35 | image: nearaurora/nearcore-mainnet:latest 36 | restart: unless-stopped 37 | init: true 38 | depends_on: 39 | - indexer 40 | expose: 41 | - 3030 42 | volumes: 43 | - ./near:/home/near 44 | networks: 45 | static-network: 46 | ipv4_address: 10.123.45.251 47 | resilver: 48 | container_name: mainnet_resilver 49 | image: nearaurora/endpoint-mainnet:latest 50 | restart: "no" 51 | init: true 52 | depends_on: 53 | - database 54 | - nearcore 55 | environment: 56 | - NEAR_ENV=mainnet 57 | - NODE_ENV=mainnet 58 | volumes: 59 | - ./config:/srv/aurora/relayer/config 60 | extra_hosts: 61 | - host.docker.internal:host-gateway 62 | entrypoint: ["sh", "-c", "/srv/aurora/relayer/util/update/update.sh"] 63 | networks: 64 | static-network: 65 | ipv4_address: 10.123.45.250 66 | reverseproxy: 67 | container_name: reverseproxy 68 | image: nearaurora/reverseproxy:latest 69 | restart: unless-stopped 70 | init: true 71 | expose: 72 | - '80' 73 | ports: 74 | - '10080:80' # Remove this line to prevent listening on public IP address. 75 | #- '127.0.0.1:10080:80' # Remove the hashtag in the beginning of this line to enable listening on 127.0.0.1. 76 | volumes: 77 | - ./contrib/nginx/mainnet:/config 78 | networks: 79 | static-network: 80 | ipv4_address: 10.123.45.249 81 | endpoint: 82 | image: nearaurora/endpoint-mainnet:latest 83 | restart: unless-stopped 84 | init: true 85 | depends_on: 86 | - database 87 | - nearcore 88 | environment: 89 | - NEAR_ENV=mainnet 90 | - NODE_ENV=mainnet 91 | expose: 92 | - '8545' 93 | volumes: 94 | - ./config:/srv/aurora/relayer/config 95 | entrypoint: ["node", "lib/index.js"] 96 | networks: 97 | static-network: 98 | watchtower: 99 | container_name: watchtower 100 | restart: unless-stopped 101 | image: containrrr/watchtower 102 | volumes: 103 | - /var/run/docker.sock:/var/run/docker.sock 104 | - ./contrib/docker/config.json:/config.json 105 | command: --interval 30 106 | networks: 107 | static-network: 108 | ipam: 109 | config: 110 | - subnet: 10.123.45.0/24 111 | -------------------------------------------------------------------------------- /contrib/docker-compose.yaml-testnet: -------------------------------------------------------------------------------- 1 | --- 2 | version: '3.8' 3 | services: 4 | database: 5 | container_name: testnet_database 6 | image: nearaurora/database-testnet:latest 7 | restart: unless-stopped 8 | ports: 9 | - '127.0.0.1:15432:5432' 10 | volumes: 11 | - ./database:/var/lib/postgresql/data 12 | networks: 13 | static-network: 14 | ipv4_address: 10.123.46.253 15 | indexer: 16 | container_name: testnet_indexer 17 | image: nearaurora/endpoint-testnet:latest 18 | restart: unless-stopped 19 | init: true 20 | depends_on: 21 | - database 22 | environment: 23 | - NEAR_ENV=testnet 24 | - NODE_ENV=testnet 25 | volumes: 26 | - ./config:/srv/aurora/relayer/config 27 | extra_hosts: 28 | - host.docker.internal:host-gateway # See: https://stackoverflow.com/a/43541732 29 | entrypoint: ["sh", "-c", "util/indexer/indexer | node lib/indexer_backend.js"] 30 | networks: 31 | static-network: 32 | ipv4_address: 10.123.46.252 33 | nearcore: 34 | container_name: testnet_nearcore 35 | image: nearaurora/nearcore-testnet:latest 36 | restart: unless-stopped 37 | init: true 38 | depends_on: 39 | - indexer 40 | expose: 41 | - 3030 42 | volumes: 43 | - ./near:/home/near 44 | networks: 45 | static-network: 46 | ipv4_address: 10.123.46.251 47 | resilver: 48 | container_name: testnet_resilver 49 | image: nearaurora/endpoint-testnet:latest 50 | restart: "no" 51 | init: true 52 | depends_on: 53 | - database 54 | - nearcore 55 | environment: 56 | - NEAR_ENV=testnet 57 | - NODE_ENV=testnet 58 | volumes: 59 | - ./config:/srv/aurora/relayer/config 60 | extra_hosts: 61 | - host.docker.internal:host-gateway # See: https://stackoverflow.com/a/43541732 62 | entrypoint: ["sh", "-c", "/srv/aurora/relayer/util/update/update.sh"] 63 | networks: 64 | static-network: 65 | ipv4_address: 10.123.46.250 66 | reverseproxy: 67 | container_name: reverseproxy 68 | image: nearaurora/reverseproxy:latest 69 | restart: unless-stopped 70 | init: true 71 | expose: 72 | - '80' 73 | ports: 74 | - '10080:80' # Remove this line to prevent listening on public IP address. 75 | #- '127.0.0.1:10080:80' # Remove the hashtag in the beginning of this line to enable listening on 127.0.0.1. 76 | volumes: 77 | - ./contrib/nginx/testnet:/config 78 | networks: 79 | static-network: 80 | ipv4_address: 10.123.46.249 81 | endpoint: 82 | image: nearaurora/endpoint-testnet:latest 83 | restart: unless-stopped 84 | init: true 85 | depends_on: 86 | - database 87 | - nearcore 88 | environment: 89 | - NEAR_ENV=testnet 90 | - NODE_ENV=testnet 91 | expose: 92 | - '8545' 93 | volumes: 94 | - ./config:/srv/aurora/relayer/config 95 | entrypoint: ["node", "lib/index.js"] 96 | networks: 97 | static-network: 98 | watchtower: 99 | container_name: watchtower 100 | restart: unless-stopped 101 | image: containrrr/watchtower 102 | volumes: 103 | - /var/run/docker.sock:/var/run/docker.sock 104 | - ./docker/contrib/config.json:/config.json 105 | command: --interval 30 106 | networks: 107 | static-network: 108 | ipam: 109 | config: 110 | - subnet: 10.123.46.0/24 111 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | --------------------------------------------------------------------------------