Giter VIP home page Giter VIP logo

celo-org / celo-monorepo Goto Github PK

View Code? Open in Web Editor NEW
683.0 61.0 359.0 160.72 MB

Official repository for core projects comprising the Celo platform

Home Page: https://celo.org

License: Apache License 2.0

JavaScript 1.55% Dockerfile 0.13% Shell 2.19% TypeScript 31.52% Smarty 0.20% Ruby 1.65% Solidity 62.48% Mustache 0.28%
crypto cryptocurrency blockchain financial-inclusion smart-contracts stablecoin celo ethereum dapp

celo-monorepo's Introduction

celo logo

Celo Monorepo - Official repository for core projects comprising the Celo platform

This repository contains the source code for the Celo core projects including the smart contracts and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo here.

GitHub Actions GitHub contributors GitHub commit activity GitHub Stars GitHub repo size GitHub

Website celo.org Blog docs Youtube forum Discord Twitter CeloDevs Twitter CeloOrg Subreddit subscribers

GitHub pull requests by-label GitHub Issues GitHub issues by-label

Contents:

๐Ÿฅ… Celo's Mission - Prosperity for All

Celo, pronounced /หˆtselo/, means โ€˜purposeโ€™ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all.

Play on Youtube - What if money were beautiful
What if money were beautiful?

๐Ÿงฑ The Celo Stack

Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders (e.g. operators of nodes in the network) involved in enabling the end user experience.

The Celo stack is structured into the following logical layers:

Celo protocol
The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol

  • Celo Blockchain: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with Ethereum, and maintains full EVM compatibility for smart contracts. However it uses a Byzantine Fault Tolerant (BFT) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The networkโ€™s native asset is Celo Gold, exposed via an ERC-20 interface.

  • Celo Core Contracts: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process.

Celo network
Topology of a Celo Network

  • Applications: Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contractsโ€™ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed.

๐Ÿ“š Documentation

Follow the instructions in SETUP.md to get a development environment set up.

See Developer's Guide for full details about the design of the Celo protocol and other information about running these projects.

๐Ÿ™‹ Issues

See the issue backlog for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features.

๐Ÿ“‚ Repo Structure

The repository has the following packages (sub projects):

  • celotool - scripts for deploying and managing testnets
  • helm-charts - (DEPRECATED) templatized deployments of entire environments to Kubernetes clusters. Check celo-org/charts instead.
  • protocol - identity, stability and other smart contracts for the Celo protocol (docs)

Code owners for each package can be found in .github/CODEOWNERS.

โœ๏ธ Contributing

Feel free to jump on the Celo ๐Ÿš‚๐Ÿš‹๐Ÿš‹๐Ÿš‹. Improvements and contributions are highly encouraged! ๐Ÿ™๐Ÿ‘Š

See the contributing guide for details on how to participate. GitHub issues by-label

All communication and contributions to the Celo project are subject to the Celo Code of Conduct.

Not yet ready to contribute but do like the project? Support Celo with a โญ or share the love in a Twitter URL

๐Ÿ’ฌ Ask Questions, Find Answers, Get in Touch

๐Ÿ“œ License

All packages are licensed under the terms of the Apache 2.0 License unless otherwise specified in the LICENSE file at package's root.

celo-monorepo's People

Contributors

aaronmgdr avatar alecps avatar annakaz avatar ashishb avatar aslawson avatar bowd avatar carterqw2 avatar cmcewen avatar codyborn avatar critesjosh avatar eelanagaraj avatar etuleu avatar gastonponti avatar gnardini avatar i1skn avatar jcortejoso avatar jeanregisser avatar jmrossy avatar m-chrzan avatar martinvol avatar mrsmkl avatar nambrot avatar pahor167 avatar pedro-clabs avatar pedro-vk avatar soloseng avatar tarikbellamine avatar timmoreton avatar tkporter avatar yorhodes 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  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

celo-monorepo's Issues

Users SBAT get a message/warning if the number is already verified

Expected Behavior

Users should get a message/warning if their number is already verified before overwriting the number<->address mapping with a new address.

Current Behavior

If a user verifies a number with a new account, no message/warning is shown about a previous existing account.

Devs SBAT update CLI docs automatically

Expected Behavior

  1. Check if CLI package has changed using git pre-commit hook
  2. Generate README and command docs with oclif-dev readme --multi
  3. Check in updates to gitbook docs/ directory

Current Behavior

Manual gitbook docs/ updates

Devs SBAT build app for 64 bit and run contracts correctly

Expected Behavior

Wallet can run all contract calls on 64 bit

Current Behavior

The verification flow works fine on the emulator, but did not work on a physical device (Google Pixel 2 XL), and it failed when receiving a code - specifically at validateAttestationCode (https://github.com/celo-org/celo-monorepo/blob/master/packages/mobile/src/identity/verification.ts#L336), where it returned the null address. Nam ran the exact same contract call with the exact same inputs on one of the validators, and it returned a non-null address.

I was able to fix this issue by disabling 64 bit builds, running on my device and the contract call succeeded. We need to fix this by August 1st (https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html)

Users SBAT recover assets through social recovery

Expected Behavior

Users who forget and lose their recovery phrase can have a subset of pre-selected trusted friends give them part of their recovery phrase, which combined recreates their recovery phrase so that they can access their account.

Current Behavior

Users who forget and lose their recovery phrase cannot access their account.

Users SBAT see the skip button on the Get Backup Key screen

Expected Behavior

As a user, I should be able to see the entirety of the "Skip" button, no matter what android device I'm using.

Current Behavior

On an LG phone with model number LM-X410ULMG, the skip button is covered by the phone's controls. The screen is not scrollable.

Image from iOS

Change title on request screen

Expected Behavior

The title on request screen should say Request Payment

Current Behavior

The title is Review Payment

Validators SBAT easily begin validating using the CLI

Expected Behavior

More coupling between validator and validator group management which reduces the number of commands to get setup and the requisite understanding of on-chain architecture (validators in groups)

Current Behavior

Entirely separate validator and validator group management in the CLI which requires numerous asymmetric commands to get setup

Devs SBAT to run the app without error: redux-persist: rehydrate for "root" called after timeout

Expected Behavior

App will always start up.

Current Behavior

When Remote Debugger is enabled most of the times I get this:

redux-persist: rehydrate for "root" called after timeout. Object undefined
reactConsoleErrorHandler @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:42722
console.error @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:18343
_rehydrate @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:127888
(anonymous) @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:127910
tryCallOne @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:47899
(anonymous) @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:48000
(anonymous) @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:48899
_callTimer @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:48788
_callImmediatesPass @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:48824
callImmediates @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:49043
__callImmediates @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:19408
(anonymous) @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:19229
__guard @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:19391
flushedQueue @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:19228
invokeCallbackAndReturnFlushedQueue @ blob:http://localhost:8081/7d8b4909-7935-46f8-8428-18bb53d4b9ec:19221
(anonymous) @ :8081/debugger-ui/debuggerWorker.js:80

Users SBAT select recipient without clicking twice

Expected Behavior

In the RecipientPicker, if the keyboard is up, clicking on a recipient will select the recipient

Current Behavior

If the keyboard is up, a click is required to close the keyboard before the recipient can be selected

Create a self-contained self-validating number input component

Expected Behavior
A nicely self-contained, reusable component that can clean it's own input

Current Behavior
Logic to clean input is spread across parent component (sendAmount, exchangeAmount)
See #4414

Looks like we already have two components for this, let's audit those see if they can be modified to fit the job:
https://github.com/celo-org/celo-monorepo/blob/master/packages/react-components/components/NumberInput.tsx
https://github.com/celo-org/celo-monorepo/blob/master/packages/react-components/components/PhoneNumberInput.tsx

See here too: https://github.com/celo-org/celo-monorepo/blob/master/packages/mobile/src/send/LabeledTextInput.tsx#L37

Users SBAT understand variable exchange rate

Expected Behavior

Users can click on info link next to exchange rate. Leads to page with exchange txn icon and the following copy: "Exchange Rates change based on demand for Celo Dollars and Celo Gold"

Current Behavior

Users do not receive information on why the exchange rate is an "estimate"

When upgrading the testnet, don't redeploy LoadBalancers unnecessarily

Expected Behavior

If we run celotool deploy upgrade testnet, if the number of validators or txnode replicas is the same as the previous version, their corresponding LoadBalancer services are not redeployed.

Current Behavior

When we upgrade, we redeploy all LoadBalancer services for validators and txnodes. This can take lots of time to get running (hours) while the validator/txnode pods are ready for use very quickly.

Notes

With the way helm is set up, I don't think there's a super easy way for us to spin up more or remove LoadBalancers if we start a testnet with a different number of replicas. It'd be easier to just take everything down and then create everything from scratch. This is worth looking into though because it'd save lots of time.

Users SBAT to test a transaction on the wallet without losing money

Expected Behavior

There should be a way for users to test a transaction on Alfajores on the wallet, and get the money back. This would look something like "Test out a transaction.". A toast would also have to be shown, something like "Note: You may lose some money in gas fees."

The implementation would involve using the current escrow contract to send a transaction and also reclaim it instantly, showcasing both a send and a received transaction in the activity feed, like so:

in a TS function,

  • create a new invite code/ temp wallet address
  • use escrow's transfer fn, with the expiry seconds field set to 1 second
  • reclaim the same payment using the invite code
    src/invite/saga's sendInvite function and src/escrow/saga would be a great place to see how inviting and escrowed payments work.

Current Behavior

Currently the user would have to send a real payment transaction, meaning they would lose Testnet money.

Pay request shows invalid total amount in some cases

Current Behavior

When opting to pay X's request the below total amount showed as 0. After requesting a payment from someone and going through with that and then opening the pay request from X's again it is now showing the total correctly.

Screenshot_20190716-111958

Devs SBAT remove all old website code

Expected Behavior

No Deprecated website code

Current Behavior

lots of old code laying around from previous design and some unused assets such as Hind font loaded on every page.

Devs SBAT update CLI docs automatically

Expected Behavior

  1. Check if CLI package has changed using git pre-commit hook
  2. Generate README and command docs with oclif-dev readme --multi
  3. Check in updates to gitbook docs/ directory

Current Behavior

Manual gitbook docs/ updates

User SNBAT paste the same verification code twice

Expected Behavior

An error message that prevents the user from pasting the same verification code twice.

Current Behavior

The user can paste the same code twice, which leads to failing verification.

verification code on screen don't match text messages

Expected Behavior

code preview should match the text message so a user knows what codes have not been read

Current Behavior

we show the decoded version on the screen and the user receives an encoded version, so they don't match

User SBAT reclaim funds associated with an unused invite after a certain period

Expected Behavior

Users might send an invite to an user who decides not to take up the invite or may send an invite to an invalid phone number and the invite itself is never received. In these cases, after a certain period, if an invite has not been activated, an inviter should be able to recover (most of) the escrow amount that they sent with that invite.

Current Behavior

Once an invite is sent, the associated fees and escrow amount can only be redeemed by the invitee. If the invitee never redeems the invite, then the funds are lost in the void.

When upgrading the testnet, don't redeploy LoadBalancers unnecessarily

Expected Behavior

If we run celotool deploy upgrade testnet, if the number of validators or txnode replicas is the same as the previous version, their corresponding LoadBalancer services are not redeployed.

Current Behavior

When we upgrade, we redeploy all LoadBalancer services for validators and txnodes. This can take lots of time to get running (hours) while the validator/txnode pods are ready for use very quickly.

Notes

With the way helm is set up, I don't think there's a super easy way for us to spin up more or remove LoadBalancers if we start a testnet with a different number of replicas. It'd be easier to just take everything down and then create everything from scratch. This is worth looking into though because it'd save lots of time.

Validator - Run Election - Error

Expected Behavior

When running this command for Validator - Run Election

$ celocli validator:register --id <VALIDATOR_ID_OF_YOUR_CHOICE> --name <VALIDATOR_NAME_OF_YOUR_CHOICE> --url <VALIDATOR_URL_OF_YOUR_CHOICE> --from $CELO_VALIDATOR_ADDRESS --noticePeriod 5184000 --publicKey 0x`openssl rand -hex 64` 

Current Behavior

Getting errors when Running for Election

Sending Transaction: registerValidator... !
Error: Returned error: gas required exceeds allowance or always failing transaction
    at Object.ErrorResponse (/usr/local/lib/node_modules/@celo/celocli/node_modules/web3-core-helpers/src/errors.js:29:16)
    at /usr/local/lib/node_modules/@celo/celocli/node_modules/web3-core-requestmanager/src/index.js:140:36
    at callbackDecorator (/usr/local/lib/node_modules/@celo/celocli/lib/utils/eth-debug-provider.js:17:13)
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/@celo/celocli/node_modules/web3-providers-http/src/index.js:96:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)

Website Visitors SBAT quickly load /community

Expected Behavior

Decrease TTFB by sending extra requests for data after initial page load

Current Behavior

TTFB is at least 2 seconds due to waiting on third party apis serverside

Share QR code button says 'Save Code Image'

Expected Behavior

The Save Code Image button on the QR code screen is a share button and should have the text Share Code Image.

Current Behavior

The button text is Save Code Image

Website Visitors SBAT quickly load /community

Expected Behavior

Decrease TTFB by sending extra requests for data after initial page load

Current Behavior

TTFB is at least 2 seconds due to waiting on third party apis serverside

Share QR code button says 'Save Code Image'

Expected Behavior

The Save Code Image button on the QR code screen is a share button and should have the text Share Code Image.

Current Behavior

The button text is Save Code Image

Devs SBAT remove hind

Expected Behavior

Hind font is no where to be seen

Current Behavior

hind font loads on every page even though it isnt used

mobile + verifier Gemfiles SBAT get fastlane from rubygems again

Expected Behavior

  • In packages/mobile/Gemfile and packages/verifier/Gemfile, the fastlane gem doesn't have its source overridden, and it comes from the default source of RubyGems.
  • In packages/mobile/Gemfile.lock and packages/verifier/Gemfile, mini_magick is set at "4.9.5" or greater.

Current Behavior

There is a vulnerability in the mini_magick version required as a dependency for fastlane. This has been fixed in fastlane's master branch, but hasn't made it to RubyGems yet. In #52, the source of fastlane was switched to github as a temporary fix.

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.