celo-org / celo-blockchain Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for the golang Celo Blockchain
Home Page: https://celo.org
License: GNU Lesser General Public License v3.0
Official repository for the golang Celo Blockchain
Home Page: https://celo.org
License: GNU Lesser General Public License v3.0
Some precompiled contracts should only be called by certain contracts, we have no way of enforcing this.
We don't do this
regular logs -> stdout, actual errors -> stderr -> Sentry ?
Contracts SBAT send encrypted phone numbers, the geth node should then decrypt the phone number and send a text with the verification code.
Phone numbers are sent in plain text.
Please describe the behavior you are expecting
What is the current behavior?
Tests should exist for abe/abe.go
No tests exist for abe/abe.go
Please describe the behavior you are expecting
What is the current behavior?
Plan to build mining power
Verification always works.
We saw an issue where the miner wasn't able to decrypt the phone number.
Users should be able to call all ERC20 contract functions on Gold. One way to do this would be to implement "transfer" and "lookup" precompiled contracts, callable only by the GoldToken contract.
In order to get ERC20 functionality we wrap gold
A user shouldn't have to worry about having a balance of Celo Gold just to make Celo Dollar transactions.
Right now you need Celo Gold to pay for gas, even if you are just sending Celo Dollars.
Please describe the behavior you are expecting
What is the current behavior?
It should connect to the bootnode
@asaj in his attempted deploy of a network set the bootnode tag to be 9568b4a305e6a51b4f4b48dfd3e8bee505ee83cc
as they are currently set for all the other geth nodes. However, that resulted in all the geth nodes being unable to connect to the bootnode with the following error:
Bootstrap URL invalid enode=enode://d576d9d033023258a24cf55cd391e32fd4e2bf6bc5bff13d364e30bad2101e6a@10.20.6.43:30301 err="invalid node ID (wrong length, want 128 hex chars)" "
I found the following SO answer https://stackoverflow.com/questions/52835449/the-output-length-of-bootnode-writeaddress-command-is-64-bytes-not-128-bytes-a that leads to ethereum/go-ethereum#17643
What I don't quite get is why verificationrewards
, the tag that predates our merge of upstream geth is the one bootnode version that is compatible with the rest of the geth nodes, vs. 9568b4a305e6a51b4f4b48dfd3e8bee505ee83cc
which includes upstream is seemingly not compatible. My guess its somewhere around defaults of which p2p protocol we are using, but haven't dug deeper
Merge and test upstream changes in
https://github.com/ethereum/go-ethereum/releases/tag/v1.8.16
Network testing / penetration testiing
https://docs.google.com/document/d/1p2W9Efrgy0BCe39WipVjXUqnlgip_G1KdX_9Va5BxTY/edit
Fees are paid exclusively in gold
Should be able to use original geth dockerfile.
Added an extra dockerfile.
We should have a branch for the current demo
No demo branch
Users will need access to the Celo binary
Private repo
Please describe the behavior you are expecting
What is the current behavior?
Understand how Ethereum and ZCash launched their mainnet, e.g. what did they do to build mining power? community? how did they stage the roll-out? what would they do differently today? etc. to better define our path to mainnet launch.
I can't map my phone number my new address, which is why when I'm sent funds they don't appear in my balance.
To repro:
Compute the address at which your actual address is stored:
const hash = web3.utils.sha3('8579988722').slice(26)
console.log(0x${hash}
)
Check the balance at that address to confirm that it's mapped to your current address:
yarn run get-balances VALUE_LOGGED_IN_1
Convert the gold balance amount to hex to get the address
Clear Celo app storage, reload, faucet your new address some money, and reverify
Rerun step 2, see that the balance did not change
CircleCI should be set up and prevent us from checking in commits that break the tests.
CircleCI is not set up.
Go Ethereum uses a test suite that is shared on other clients to assert its compliance with the ethereum protocol. It doesn't work for celo since our protocol is different, hence we don't use it.
We want to adapt it and use it for our blockchain.
Check
https://github.com/ethereum/tests/tree/ad2184adca367c0b68c65b44519dba16e1d0b9e2
Tests should pass
Tests don't pass
panic: runtime error: slice bounds out of range [recovered]
panic: runtime error: slice bounds out of range
goroutine 21199 [running]:
testing.tRunner.func1(0xc052ac8800)
/usr/local/Cellar/go/1.11/libexec/src/testing/testing.go:792 +0x387
panic(0x444b0a0, 0x48777d0)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/ethereum/go-ethereum/core/types.DecodeVerificationRequest(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/types/receipt.go:123 +0x670
github.com/ethereum/go-ethereum/core/vm.opCall(0xc051a96478, 0xc029c9f500, 0xc01634d440, 0xc00c11cd00, 0xc00c11cd20, 0x2bc, 0x1388, 0x32, 0x61a8, 0xc029c9ca80)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/instructions.go:754 +0x81b
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc029c9f500, 0xc01634d440, 0xc00022c1b0, 0x44, 0x90, 0x441a800, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/interpreter.go:257 +0x5fa
github.com/ethereum/go-ethereum/core/vm.run(0xc029c9ca80, 0xc01634d440, 0xc00022c1b0, 0x44, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/evm.go:68 +0x230
github.com/ethereum/go-ethereum/core/vm.(*EVM).Call(0xc029c9ca80, 0x4579e80, 0xc001dd24c0, 0xb3dedd8ce29a870e, 0x5a5054b39d5a401a, 0xbdb06055, 0xc00022c1b0, 0x44, 0x90, 0x94858, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/vm/evm.go:240 +0x4f7
github.com/ethereum/go-ethereum/core.(*StateTransition).TransitionDb(0xc0542498f0, 0x457efe0, 0xc0037577a0, 0xc051a96420, 0xc0542498f0, 0x10, 0xc00c11cb01, 0xc051a96430)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/state_transition.go:213 +0x3c3
github.com/ethereum/go-ethereum/core.ApplyMessage(0xc029c9ca80, 0x457efe0, 0xc0037577a0, 0xc051a96420, 0x1, 0xc051a96430, 0x0, 0x1, 0x4e6f9da04a5c7968, 0x30adc2f8dddee5d3, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/core/state_transition.go:132 +0x5b
github.com/ethereum/go-ethereum/tests.(*StateTest).Run(0xc0522be000, 0xc0524e7050, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/tests/state_test_util.go:143 +0x4de
github.com/ethereum/go-ethereum/tests.TestState.func1.1.1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/tests/state_test.go:60 +0xb5
github.com/ethereum/go-ethereum/tests.withTrace(0xc052ac8800, 0x99cf0, 0xc053dbdf50)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/tests/state_test.go:72 +0x67
github.com/ethereum/go-ethereum/tests.TestState.func1.1(0xc052ac8800)
/Users/tim/Celo/geth/build/_workspace/src/github.com/ethereum/go-ethereum/tests/state_test.go:59 +0x175
testing.tRunner(0xc052ac8800, 0xc05230f140)
/usr/local/Cellar/go/1.11/libexec/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
/usr/local/Cellar/go/1.11/libexec/src/testing/testing.go:878 +0x353
FAIL github.com/ethereum/go-ethereum/tests 49.366s
As part of validating a block miners should extract the public key from the previous block header and verify that it matches the block coinbase.
No validation is done on the signature.
When load is not high, miners will accept transactions with gasprice=0
Please describe the behavior you are expecting
What is the current behavior?
We should never have to think about rebuilding mobile geth
We have to rebuild on every merge to master and update mobile package.json
block.coinbase should return the address of the current block miner when running on a proof of authority testnet.
block.coinbase is always set to 0x0 when using PoA
We will allow miners to set their own URL for their verification service.
All miners use the same verification service. It is a URL that is hardcoded into Geth.
Redeploy and retain state
State is nuked on helm upgrade
Users SBAT send their encrypted phone number to the target verifier node without sending a transaction, via whisper or the gossip protocol.
Users send their encrypted phone number via a transaction, which is then run by the verifier node when the block is mined.
This contract should only be able to be called by the AddressBasedEncryption contract
Anyone can call it
When multiple light clients are on the same network, they should still be able to connect to the same node.
Due to ethereum/go-ethereum#16899 (comment), currently light clients cannot have the same IP address
We made a modification in #41 to change the identification of a peer by IP address to their enode address. This loosens our ability to actually identify badly behaving clients but allows us to continue to use our Kubernetes setup as well as have multiple light clients on the same network.
Miners can specify who will receive the reward for completed verifications. In the short term, this can be the verification pool's wallet address, longer term, a Terms of Service contract published by the verification pool that splits rewards between the miner and the pool.
This is the geth compliment to celo-org/celo-monorepo#738
Verification rewards are always credited to the miner.
We should decide on a unit testing method, be that choosing a testing framework or conventions for our own tests. I've used Ginkgo with Gomega before, a typical unit testing framework with a DSL similar to mocha's.
From a quick browse through the repo, looks like there's a bunch of different approaches to testing being used.
Subdirectories are owned by certain users, who are required to approve PRs touching that code.
Things are done ad-hoc.
Nodes should wait 30s between redialing another node
Set to 10s as a hack because the nodes in our PoA testnet continually disconnect
We turned off V5 discovery and not sure if this is necessary
We should CI/CD docker images, possibly on GCP
Developers have to build docker images manually
We get successful or pending transactions metrics in geth
We can't get successful or pending transactions metrics in geth
Up script should automatically connect the two miners
Miners need to be made aware of each other manually
We don't have to allow future blocks
We need future blocks for PoA
International phone numbers should be able to be verified. E164
Our regex currently checks the decrypted phone number against a regex which will only match for US phone numbers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.