Giter Site home page Giter Site logo

paloma's Introduction

Logo!

Continuous integration Project Status: WIP โ€“ Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. GitHub go.mod Go version License: Apache-2.0 Lines of code

A Golang implementation of Paloma Chain, a decentralized, automation network for smart contracts deployed in the Cosmos, EVM, Solana, and Polkadot networks.

For Crosschain Software engineers that want simultaneous control of mulitiple smart contracts, on any blockchain, Paloma is decentralized and consensus-driven message delivery, fast state awareness, low cost state computation, and powerful attestation system that enables scaleable, crosschain, smart contract execution with any data source.

Table of Contents

Talk to us

We have active, helpful communities on Twitter and Telegram.

Releases

See Release procedure for more information about the release model.

Active Networks

Mainnet

N/A

Testnet Setup Instructions

To get the latest palomad binary:

wget -O - https://github.com/palomachain/paloma/releases/download/v0.2.1-prealpha/paloma_0.2.1-prealpha_Linux_x86_64v3.tar.gz | \
sudo tar -C /usr/local/bin -xvzf - palomad
sudo chmod +x /usr/local/bin/palomad
# Required until we figure out cgo
sudo wget -P /usr/lib https://github.com/CosmWasm/wasmvm/raw/main/api/libwasmvm.x86_64.so

Connecting to an existing testnet.

Download and install the latest release of palomad.

Initialize our configuration. This will populate a ~/.paloma/ directory.

MONIKER="$(hostname)"
palomad init "$MONIKER"

Copy the configs of the testnet we wish to connect to

wget -O ~/.paloma/config/genesis.json https://raw.githubusercontent.com/palomachain/testnet/master/passerina/genesis.json
wget -O ~/.paloma/config/addrbook.json https://raw.githubusercontent.com/palomachain/testnet/master/passerina/addrbook.json

Next you can generate a new set of keys to the new machine, or reuse an existing key.

VALIDATOR=<choose a name>
palomad keys add "$VALIDATOR"

# Or if you have a mnemonic already, we can recover the keys with:
palomad keys add "$VALIDATOR" --recover

Get some funds!

ADDRESS="$(palomad keys show "$VALIDATOR" -a)"
JSON=$(jq -n --arg addr "$ADDRESS" '{"denom":"ugrain","address":$addr}') && curl -X POST --header "Content-Type: application/json" --data "$JSON" https://backend.faucet.palomaswap.com/claim

We can verify the new funds have been deposited.

palomad query bank balances --node tcp://testnet.palomaswap.com:26657 "$ADDRESS"

Stake your funds and create our validator.

MAIN_VALIDATOR_NODE="tcp://testnet.palomaswap.com:26657"
CHAIN_ID="paloma"
DEFAULT_GAS_AMOUNT="10000000"
VALIDATOR_STAKE_AMOUNT=100000grain
PUBKEY="$(palomad tendermint show-validator)"
palomad tx staking create-validator \
      --fees 10000grain \
      --from="$VALIDATOR" \
      --amount="$VALIDATOR_STAKE_AMOUNT" \
      --pubkey="$PUBKEY" \
      --moniker="$MONIKER" \
      --chain-id="$CHAIN_ID" \
      --commission-rate="0.1" \
      --commission-max-rate="0.2" \
      --commission-max-change-rate="0.05" \
      --min-self-delegation="100" \
      --gas=$DEFAULT_GAS_AMOUNT \
      --node "$MAIN_VALIDATOR_NODE" \
      --yes \
      -b block

Start it!

MAIN_PEER_DESIGNATION=0f4411c257bfe7bf191c2c3fd32b385a363487cf@testnet.palomaswap.com:26656
palomad start --p2p.persistent_peers "$MAIN_PEER_DESIGNATION"

Running with systemd

First configure the service:

cat << EOT > /etc/systemd/system/palomad.service
[Unit]
Description=Paloma Blockchain
After=network.target
ConditionPathExists=/usr/local/bin/palomad

[Service]
Type=simple
Restart=always
RestartSec=5
WorkingDirectory=~
ExecStartPre=
ExecStart=/usr/local/bin/palomad start --p2p.persistent_peers [email protected]:26656
ExecReload=

[Install]
WantedBy=multi-user.target

[Service]
LimitNOFILE=65535
EOT

Then reload systemd configurations and start the service!

systemctl daemon-reload
service palomad start

# Check that it started successfully.
service palomad status

Uploading a local contract

CONTRACT=<contract.wasm>
VALIDATOR="$(palomad keys list --list-names | head -n1)"
palomad tx wasm store "$CONTRACT" --from "$VALIDATOR" --broadcast-mode block -y --gas auto --fees 3000grain

Setting up a new private testnet

Download and install the latest release of palomad.

Install jq, used by the setup script.

apt install jq

Set up the chain validator.

PALOMA_CMD=palomad \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/palomachain/paloma/master/scripts/setup-chain-validator.sh)"

We should now see an error free execution steadily increasing chain depth.

palomad start

Others wishing to connect to the new testnet will need your .paloma/config/genesis.json file, as well as the main peer designation. We can get the main peer designation with jq:

jq -r '.body.memo' ~/.paloma/config/gentx/gentx-*.json

paloma's People

Contributors

vizualni avatar measure-fi avatar verabehr avatar taariq avatar rootedbox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.