GithubHelp home page GithubHelp logo

palomachain / paloma Goto Github PK

View Code? Open in Web Editor NEW
289.0 10.0 132.0 14.04 MB

The fast blockchain messenger protocol

License: Apache License 2.0

Go 98.66% Shell 0.90% Dockerfile 0.11% Makefile 0.32%
blockchain ethereum cosmos-sdk solana binance-smart-chain arbitrum cometbft kava optimism

paloma's People

Contributors

0xmuralik avatar aleem1314 avatar alessio avatar alexanderbez avatar alpe avatar brianosaurus avatar byte-bandit avatar deepan95dev avatar dependabot[bot] avatar jinjingroad avatar kj89 avatar maharifu avatar mahofmahof avatar markdaveny avatar measure-fi avatar mszuyev avatar omahs avatar overallteach avatar rootedbox avatar taariq avatar toasterthebrave avatar verabehr avatar vishal-kanna avatar vizualni avatar webelf101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paloma's Issues

Message design for scheduled jobs

Background

We need to define a message which includes the smart contract address, payload and coins, along with the message’s unique ID. This message is to be used for the signing queue.

This differs from the “public” message where users define their jobs.

Done when

  • Message is defined in the protobuf

Signing messages from runners

Background

There are a couple of usecases we need to solve for message signing from the runners perspective:

  • Messages broadcasted to other chains (in this case Terra), need to be signed. We need a way to sign a CosmWasmExecute message from the runner’s perspective.
  • We also need to sign messages in the CosmWasmExecuteMsg format that we are signing to get 2/3 of signatures back.
  • And also, we need to sign the message to update the validator set to get a network concensus.

Done when

  • We can sign any arbitrary sdk.Msg and also verify signatures
  • We allow user to load keyring path in which they have their terra keys stored which is going to be used for message signing.

Message signing queue

Background

Once user submits a message for execution, we need to have a way for all validators to get new messages that need to get signed, and a way for them to submit their signatures.

The validators also need an endpoint to get messages which have reached a consensus and are ready for execution.

Done when

  • #50 and these tasks should be done together:
    • We have a query endpoint that can (given a validator’s address) return messages (emphasis on plurality) that need to be signed for the given validator.
    • We have a TX endpoint to which runners can submit signatures along with the messages that they have signed.
    • We have a query endpoint to query messages that have reached the consensus.
  • A way to add message to the signing queue (for internal usage)
  • A way to remove message from the signing queue (for internal usage)

Sparrow configuration

Background

This is a top level ticket for runner configuration. Users should be able to customize their runners via configurations. Details should come in separate tickets.

Done when

  • there is a configuration for runners and runners are using the said configuration
  • the configuration is documented
  • we can't know all configuration required right now, but should build a way to have a support for it in the future

As creators of the chain, we want to have the right slashing parameters in place so that malicious behavior on the validator side is prevented, while risk for them is low enough to they remain engaged and are motivated to stake.

As Volume, we want to have the right slashing parameters in place so that malicious behavior on the validator side is prevented, while risk for them is low enough to they remain engaged and are motivated to stake.

Acceptance Criteria

Slashing amounts / parameters / punishments

  • 5% for signing a fake validator set or message, double sign, etc.
    • Will only be slashed once, then the validator should be jailed
  • 5% for failure to sign a message or validator set
    • Will only be slashed once, then the validator should be jailed

  • 1% for a downtime of 10k blocks (~13h)
    • → Jailing is very important in this case (as it preserves network uptime)
  • Jailing

Define ValidatorSetUpdate message

Background

Define a message that’s used to update validator sets on our CosmWasm smart contract. The message needs to have a validator’s address and their staking power (in absolute terms).

Done when

  • Message is created as a protobuf message.

Conductor main loop and project structure organization

Background

Given that we are doing polling from the runner’s perspective, we need to have the (so called) main loop, in which we can query messages for signing & broadcasting. This is the beating heart of a runner.
We also need to organize code a bit better. So far, the code has been written mostly as something that we are using to test the idea.

Done when

  • When runner is started, the main loop is started as well.
  • project is organized a bit better

Setup the github actions for running tests

Background

As testing is really important, we don't want to submit any PR that breaks tests. We also don't want to merge broken PRs.

Done when

  • we have a basic go test running on every branch
  • disallow merging PRs without the test action passing

Query and broadcast transactions on chains using their GRPC server/clients

Background

Currently, we are using "raw" BroadcastTX when communicating with chains from the runner instance. We should take the GRPC server&client proto definition instead and communicate with the server like that. Same goes for running queries.

Done when

  • we can execute transactions on other chain from runner via their grpc server
  • we can query other chain from runner via their grpc server

User interface Design

V1 Features

Ability to

  • Specify host chain
  • Specify target chain
  • Specify Target Contract
  • Specify Message Payload
  • Submit message

Cross-chain communication through Runners

Background

We need to communicate with the Terra chain from within our runners which are a part of a FedEx chain (a sidecar process/goroutine).

We need to have a chain to query and broadcast transactions over the wire to other chain.

Given that there already exists a library that does this (LENS, by Strangelove) we don’t need to implement this ourselves.

Done when

  • we have imported lens library and verified that it works.

Runner signing messages and sending signatures to the chain

Background

We need to build a tool in the runner to query messages that need to be signed by the runner itself so that consensus can be reached. We also need to submit those signatures back to the chain to store them.

Done when

  • we can query for messages from our chain that need to be signed from the runner
  • we can submit signatures for messages that we have queried from the runner

Password input for runner's keyrings

Background

When creating a new ChainClient using lens library, the keyring in background expects user to enter password.
This is all fine but this cannot work for our usecase because runners will be executed as a long running process
which should be able to restart itself if there ever is a failure. That would mean that validator/user would need to manually
enter their password every time.

Mind the "userInput" argument: https://github.com/cosmos/cosmos-sdk/blob/df8745909c9d973d3ddad7400140ec42ca17a316/crypto/keyring/keyring.go#L172
This asks user for password via stdin, and then stores the password in memory.

A proposal is to inject the password via ENV variable and store it in memory instead of user having to enter their password every time.

Done when

  • user doesn't have to enter their password via stdin for runner to get access to keyring

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.