GithubHelp home page GithubHelp logo

zack-bitcoin / amoveo Goto Github PK

View Code? Open in Web Editor NEW
464.0 90.0 110.0 12.7 MB

A blockchain for trust-free markets in financial derivatives

Shell 0.05% Erlang 91.15% Forth 0.79% HTML 0.29% JavaScript 3.45% Makefile 0.67% Python 2.64% Scheme 0.97%

amoveo's Introduction

Amoveo

Amoveo is a blockchain meant for enforcement of investment and insurance contracts.

Amoveo contracts are enforced using state-channels. This means fees are low, contracts are nearly instant and can support a global audience.

Amoveo has futarchy-based oracle technology. Amoveo can learn facts about our world and enforce the outcome of contracts that are governed by these facts. This, for example, enables you to bet on the price of Amazon shares.

The variables that define how to participate in Amoveo can be modified by the Amoveo community using futarchy, a betting-type governance mechanism. This way Amoveo will always stay optimally tuned to produce the best results.

Amoveo whitepaper.

Amoveo main net was launched at 11:00 AM GMT on March 2, 2018.

The current market cap in VEO

Community

Amoveo forum on reddit

Amoveo announcements on twitter

Amoveo on Telegram

Amoveo on Discord. Русский чат. 中文聊天.

Historic difficulty in depth.

Amoveo website from the Exantech, the same people who wrote an iphone and android app

Website for exploring oracles and governance variables

Light node

The most secure way to use the light node is to download it from github. https://github.com/zack-bitcoin/light-node-amoveo This is a cryptoeconomically secure way to use Amoveo.

you can use the light node less securely by clicking this link. This is the easiest way to get started. Using this light node is the same as trusting this server with your money.

An alternative exan.tech made a light node with a different user interface that they host here: Amoveo.exan.tech Using this light node is the same as trusting them with your money.

This light node downloads headers and verifies the proof of work. It verifies the merkle proofs for all blockchain state you download to ensure security equivalent to a full node, provided you wait for enough confirmations.

Block Explorer

Veopool explorer

The block explorer for the network is here. This explorer can host markets.

Full node

Launch an erlang full node and connect to the network

Issue commands to your full node Commands such as:

  • turning the node off without corrupting the database.
  • looking up information from the blockchain or it's history.
  • making a server that collects fees by routing payments or making markets
  • participating in the oracle mechanism or governance mechanism.

Mining

This is an open-source miner for AMD and Nvidia GPU. Currently only works with Linux

This is a miner. it is for Nvidia or AMD GPUs. It is closed-source.

here is another closed source miner

here is miners for 5 different kinds of fpga

Amoveo's mining algorithm uses SHA256 like bitcoin. But it is a little different, so bitcoin ASICs cannot be used to mine Amoveo.

Full node keys are stored in _build/prod/rel/amoveo_core/keys/keys.db

Mining Pools

the only public mining pool

Run your own pool.

Run your own pool.

Trading

There are people trading now on discord https://discord.gg/xJQcVaT

Software to launch a new mining pool

A mining pool

Developers

If you want to build on top of Amoveo read the developer's guide

amoveo's People

Contributors

bgorlick avatar cprytv avatar cytadela8 avatar daggerhashimoto avatar eminogrande avatar getong avatar joelreymont avatar kaidiren avatar keypair avatar kwikiel avatar mandelhoff avatar marcuswin avatar mr-flintstone avatar mr-pookenstein avatar nextquick avatar nidea4u avatar osgee avatar pebwindkraft avatar rosoposo avatar scott-lew-is avatar sdtsui avatar sennui avatar sentedelviento avatar sjamayee avatar sonaken avatar stefek99 avatar tumblecatweed avatar tylerl-uxai avatar zack-bitcoin avatar zp-sd 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  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

amoveo's Issues

Initial node sync failing?

I got a fresh clone about 10 minutes ago. I did the start:sync() and it sync'd for a while. It seems to stall out.

I can run api:height(). and it tells me 2254 which is the height that your Explorer web page shows, but I keep getting timeouts and getblock errors like the screenshot.

The pool also gives an error saying the node isn't sync'd.

image

image

keys:id(). and keys:address(). do not seem to work

(ae_core_prod@ivi3t4l-VirtualBox)32> api:balance().
3598233513
(ae_core_prod@ivi3t4l-VirtualBox)33> keys:id().
** exception error: undefined function keys:id/0
(ae_core_prod@ivi3t4l-VirtualBox)34> keys:pubkey().
<<4,79,113,118,99,248,182,217,226,159,200,119,192,217,46,
207,144,167,176,123,138,230,182,208,29,191,192,70,116,
...>>
(ae_core_prod@ivi3t4l-VirtualBox)35> keys:address().
** exception error: undefined function keys:address/0
(ae_core_prod@ivi3t4l-VirtualBox)36>

Nodes out of sync?

The 159.89.106.253 node was down for a few hours. During that time, I mined a few blocks on my node. My node is at height 105.

The 159.89.106.253 node is up now, and has block height 99. I tried a sync:start(). on my node, and got the "weird response" messages shown in this screenshot.

image

Will 159.89.106.253 sync up with my height at 105, or do I have to do something to sync back to 159.89.106.253 at height 99?

Node crashes on start

Within the last 30 min, I did a rm -rf amoveo and cloned a fresh copy. It built fine and ran. I turned it off with api:off(). and halt().

The screenshot shows the fail to start twice. It is failing to start back up with this error:

image

Account Balance Mismatch

I mined a block, and it it looks like the 159.89.106.253 node accepted it. My node and 159.89.106.253 are both at block 192, but they have a different account balance for my node's wallet address:

BPA3r0XDT1V8W4sB14YKyuu/PgC6ujjYooVVzq1q1s5b6CAKeu9oLfmxlplcPd+34kfZ1qx+Dwe3EeoPu0SpzcI=

image

Node/Pool Work and Crash Dump

I got my node synced and then started my local pool. It appears to have worked, but gave some odd console output:

image

I mined two blocks and got this crash dump on the pool and a bunch of "weir responses" on the node:

image

I think the "mine" might have worked though. My node wallet got some veo:
BIJw6vdb+BexSLCZQ7XZEsW6RDltxTrmbGkDbKb1yNPhOpngyKDAqBkGMKaa1ZEH9Bh2d7ezhTX6nhGBldFzEPU=

Are these errors or just scary console outputs?

tx_pool_feeder died - Miner payouts failing?

I was doing some mining, and thought I was noticing my miner wasn't always paid when a block was found.

I don't see anything unusual on the pool and miner console messages, but I saw "tx_pool_feeder died" right after some (but not all) of the node spend messages that indicate miner payouts.

I think the node is getting the block reward. The node balance is going up across block finds, but the payout seems to fail occasionally.

image

spend_tx API?

I can do a spend_tx from the Erlang prompt, and I can do a spent_tx from the Light Wallet. I would like to do a spend_tx from a REST based command like curl.

I see the json sent via the light wallet. When I try to reproduce this with curl or c# or c++, I get a server 500 error.

image

The json in this screenshot appears to just be pub keys, so I'm guessing the priv key comes in to play somewhere and somehow that I'm not observing.

In case I'm going about this all wrong - my goal is to remotely make payments programatically (no Erlang prompt and no Light Wallet UI).

multiple payment send follwed by server crash

Sending 10 multiple payments, in rapid succession from http://localhost:8081/main.html, at block 298, to BJjOADT/mMg0BsqQkCDcEb/ylv6W85wipEKrY3qV5z3XvVrNygvVoEXsA6tncAoMuyvMB5Prepzqql3zZ1sDjjo=
seemed to crash the peer 146.185.142.103.

When i stopped the mining and executed "make prod-stop, and make-prod clean, then restarted, blocks synced back up to block 130.

When I reset again, blocks started syncing to block 0, and proceeded to mine blocks 1,2,3 ....

Potentially, my enthusiasm for some robust testing, caused a problem in the mempool at your end. The issue was replicated 8 hours beforehand.

Update: Blocks have re-synced back up to 270. I suppose the more nodes on this network, the more stable it is.

Create Account and Spend problems?

I tried create account and spend from my full node account to another account and errors happened. I tried the public address with and without quotes (in base64 format).

image

Block Found Errors

My full node and pool are synced with your node (currently at block 468). They stayed in sync all day fine. I kicked off some mining tonight. When I found blocks, the height did not increase and balance of my node and miner did not increase. It's like the found blocks failed to commit. No one else is mining. Your node shows block 468 throughout my tests.

The full node has been spitting out errors like this screenshot. This is the output from finding one block. It appears to try the spend many times when the pool submits the block, but it's not successful.

I'm pretty certain my keys are unlocked as I did a few spends from my node earlier today.

image

The invitation

hi, I want invate you to https://github.com/amoveo-org as admin role, it named amoveo-org temporarily If you have a preferred name, we can rename it. feel for free. if you do not want to do this, it's also ok.

😊

Password handling

The first thing I try when approaching a new coin is to make a private key printable on paper.

When looking at the way passwords are handled, there should be an interactive version of any command that requires password of private key input. The command history is stored on disk and may present an attack vector for people trying to fins keys.

https://github.com/zack-bitcoin/amoveo/blob/master/docs/api/keys.md

GPU mining

We need software to make it easy to mine Amoveo with a GPU.
We also need instructions on how to set the miner up.

http://146.185.142.103:8080/explorer.html unreachable

After running the testnet successfully for a few hours, and doing some transactions, I decided to test about 5-10 transactions of a smaller amount, successively and shortly after the site was inaccessible.
The block number was around 175

Keys Unlock on Amoveo Node

I did a keys restore on my node.

I copied my keys.db up to the new node here while the node was stopped.
/amoveo/_build/prod/rel/ae_core/keys/keys.db

Then, I did make prod-go. The api:balance(). shows a balance value that looks correct. I can't seem to unlock the keys to spend funds to pay miners.

I tried keys:unlock("password"). as the text suggests. I also tried "PASSWORD1234" and a password value that I used on my previous node. I wrote it down, so I'm pretty sure it's correct. (I redacted my real key password in red.)

Am I doing something wrong or is this maybe a bug?
Thank you.

image

bad password gives a non descriptive error

if an incorrect password is given the error that comes back is not clear on what happened.
(ae_core_prod@ivi3t4l-VirtualBox)47> keys:unlock("a").
ok
(ae_core_prod@ivi3t4l-VirtualBox)48> keys diedstart keys

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hi Zack. I'm testing out the light wallet...

http://159.89.106.253:8080/wallet.html

I'm able to mine blocks but from time to time (seems a random occurrence) get the following error.

Failed to load http://159.89.106.253:8085/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://159.89.106.253:8080' is therefore not allowed access. The response had HTTP status code 500.

OSX 10.13.2. Chrome Version 63.0.3239.132 (Official Build) (64-bit)

Screen shot: https://imgur.com/a/iCaqB

Hope this helps!

Sync and Keys Question

So my sync keeps stopping at block 499
Is this because I am using a wifi? or because I am using a institutional network?
It is very wierd.
Also, can anyone help me to parse the keys into human readable form? I found the keys.db.

Bet Settling and Combining Bet Errors

I clicked the "check if any bets have been settled" button, and got a "this channel has been closed" error.

I clicked the "combine bets in opposite..." button, and got a server 500 error.

image

market completion gui

When a market is concluded, we need to remove the buttons for canceling trades. COMPLETE
The explorer should stop displaying the market as active. COMPLETE
it should be convenient to settle the channel bets and take your winnings. <---- Still Needed

Sync:start(). weird response and fail

Just for tracking, this is the screenshot from when I ran sync to send blocks back to your node. It looks like everything worked fine, but my node gave a bunch of these warning messages:

Please close this if you don't need this for tracking.

image

Crash report

Mining crashed on block 803. On Block 802, I made a channel on localhost:8081/main.html. of 500 tokens. Block chain seems to be reset from block zero.

Error: mining_data from external source

I was able to run the c-miner locally using 127.0.0.1:8081

I could not run the c-miner from another computer and point it at myserver:8080. I was able to hit other myserver:8080 endpoints such as pubkey and height, so the port was open fine.

I thought I might need to add a "doit" handler for mining_data in ext_handler.erl, but I didn't have luck doing that.

I'm not sure if the Light Node Wallet web page has the same or a different issue:
http://159.89.106.253:8080/wallet.html

I tried hitting the "mining_data" API on port 8080 and 8085 but no luck there.

image

Mining on full local node: server gave confusing response

I setup a full local node on Ubuntu and pointed a local miner at it. The miner ran for roughly 20 minutes fine and found several blocks.

After a while, it would start spamming the miner console with "server gave confusing response" and not recover. This happened to me twice, so it seems reproducible.

Here are screenshots of the server and miner consoles from the two times I observed this:

image

mining pool

We need mining pool software for Amoveo, this way people can work together to find blocks.

mining starting nefore sync finished

My machine appears is mining before the sync has finished.

I observed in the code that mine:start() calls sync:start(). however when I check my processors, they have appear to be mining. (ie, cores running at 100%). This should not happen until sync is finished, right??

Is there any way to check the correct blocks have been download from the console.

Blocks are stored, one per file. Do you have plans to store multiple blocks in one file. Its going to be a bit cumbersome at block 50,000 having 50,000 files stored in the blocks directory.

Perhaps good to have a chainstate directory, in a leveldb database, before thing scale up.

Not able to display addresses

I have this error when i try to do a command which is available in documentation.

(ae_core_prod@Mbp)22> keys:address().
** exception error: undefined function keys:address/0

packer.erl missing(?)

When I try to run sync:start(). , the following error is thrown :

sync with peer ** exception error: undefined function packer:pack/1
in function sync:start/1 (/home/***/Amoveo/amoveo/_build/prod/lib/ae_core/src/consensus/sync.erl, line 50)

Looking at the history, it might be because src/consensus/packer.erl is missing.

Make Bet Error

I loaded up my channel state and tried to make a bet. (I'm not sure if this is related to channel state loading or not.) This was after I had successfully made bets on this same channel.

Screenshots of the errors:

image

image

api:add_peer broke sync?

I ran api:add_peer on my node, and now it won't sync. Height is locally 201 and current height on your node is 423.

Is there something I can do to fix this? Thank you.

image

Make Channel Failing on Light Wallet

I have an account with 3.0 veo, and I tried to lock 2.0 veo in a channel with your 159.x server. I asked it to last 4700 blocks, and tried delay values of 0, 1, 10, and 100. All had similar errors:

image

Initial Account Details for new Full Node

I stood up a fresh full node, and it appears to have an account with a balance. I mined two blocks. It credited the account on my full node, so that worked for me.

image

The pool appeared to pay out to the miner worker a 0.007 balance per block, which matches the code:

image

  1. How do I set the account on the full node to something else? I tried several variations of keys:load but none had luck: With quotes, without quotes, base64 encoded, hex-ascii strings, etc...
    keys:load("BOVs4Dnu43koQKf+6u3SIe0ghcHsYfMfYqxgO9Rf1y/locBazvrjqxtQMGAP8jr0Tas+43s1sOtYRDvvcZw6+fI=", "Base64encodedPrivateKeyValueHere", "password").
    What should work?

  2. Does the full node initialize to a new account or is it using a default existing account when a user first turns on the full node?

  3. What is the format for the <<4, 104, 77...>>? It appears to be 0-255 byte values, but is it useful if the ... cuts off values in the keys?

  4. On the api:account() print, is the first << >> the pub key? What is the second << >> set? (I suspect it's the private key, so I redacted it in red above.)

Continuous Node Sync with out Public IP

I stood my node up and did a sync:start(). That worked. Someone is mining, and the http://159.89.106.253:8080/wallet.html is showing increasing height. My node doesn't appear to be picking up the increased block heights until I type sync:start(). again.

If I call sync:start()., it does seem to go get the new blocks that 159.89.106.253 knows about. Is there something I need to do to get my node continuously sync?

image

Confusing config file

When looking at the file config/prod/sys.config after build it is a bit confusing, and might need cleaning up, if the sysadmin should need to modify it. First, the head section of the file is:

[
  { ae_core, [

        {port, 8080},    {internal_port, 8081},    {swagger_port_internal, 8042},    {swagger_port_external, 8043},    {peers, [[{146,185,142,103}, 8080]]},    {master_pub, <<"BL18ctFCJ4/i0HuiIJbF/F/ktgjADSub5rbe3RBIrsDUHBUVqqoEmv5wLEmjq3d8pTA07J2PQo87CY2B+0baQQk=">>},    {test_mode,false},    

    {peers, []},

    {master_pub, <<"BIVZhs16gtoQ/uUMujl5aSutpImC4va8MewgCveh6MEuDjoDvtQqYZ5FeYcUhY/QLjpCBrXjqvTtFiN4li0Nhjo=">>},

    {test_mode, true},
    {cores_to_mine, 1000}, %% The maximum number of cores to use when mining.


    {channel_delay, 10},
    {max_message_size, 10000},
    {token_decimals, 100000000},

    %% Everything above this line is needed for blockchain consensus. Everything below this line can be modified for your node.

    {smart_contract_runtime_limit, 5000}, %% in miliseconds.
    {revert_depth, 20}, %% save all data from the most recent block, and this far into history. That way if blocks are reverted, we still have all the state. For light nodes this should be set to 0.


  1. The file first states test mode = false, then test mode = true.
  2. The statement "Everything above this line..." must surely be wrong. I can't imagine changing the port would affect consensus. Perhaps replace with: BEGIN/END sections eg:
%% This section must be intact to maintain consensus, don't edit
.
.
.
%% end of section

%% Everything after this line may be modified for your node

.
.
.

Two ports left open after ruinning tests

Running tests on Ubuntu 17.10 , Intel Xeon platform.

Ports 3013 and 3030 were still open after running make tests. Had to be closed manually

Failed 2 tests. Output below

======================================================================
FAIL: test_market (tests.test_market.MarketTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/2TB/GIT/testing/amoveo/tests/test_market.py", line 28, in test_market
    self.request('new_channel_with_server', DEV_2_INT, [[127, 0, 0, 1], 3030, 27, 10000, 10001, 50, 4], sleep=0.04)
  File "/media/2TB/GIT/testing/amoveo/tests/base.py", line 90, in request
    return self._request(node, action, args, sleep)
  File "/media/2TB/GIT/testing/amoveo/tests/base.py", line 96, in _request
    self.assertEqual(response.status_code, 200)
AssertionError: 500 != 200

======================================================================
FAIL: test (tests.test_share_blocks.ShareBlocksTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/2TB/GIT/testing/amoveo/tests/test_share_blocks.py", line 13, in test
    self.mine_block(DEV_2_INT, [1, 1], sleep=0.2)
  File "/media/2TB/GIT/testing/amoveo/tests/base.py", line 48, in mine_block
    return self._request(node, 'mine_block', args, sleep)
  File "/media/2TB/GIT/testing/amoveo/tests/base.py", line 96, in _request
    self.assertEqual(response.status_code, 200)
AssertionError: 500 != 200
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): localhost
urllib3.connectionpool: DEBUG: http://localhost:3011 "POST / HTTP/1.1" 200 11
urllib3.connectionpool: DEBUG: http://localhost:3011 "POST / HTTP/1.1" 200 11
urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): localhost
urllib3.connectionpool: DEBUG: http://localhost:3021 "POST / HTTP/1.1" 500 0
--------------------- >> end captured logging << ---------------------

Full node issues after running c-miner for a period of time

When running the c-miner locally on my full node, it runs as expected, eventually finds a block, then randomly stops and produces an error.

On the full node output, I get the following message, about 10 times in a very quick fashion (<2 seconds):

got this data
["mining_data"]

After the 10th or so message, the c-miner will return the following error:

cannot connect to server** exception error: no match of right hand side value 2
     in function  miner:talk_helper/3 (miner.erl, line 68)
     in call from miner:start2/0 (miner.erl, line 36)

If I try to restart mining, I will get the same sequence of events, immediately.

Additionally, if I stop the full node properly and restart it (without deleting the database), then run "sync:start().", I get the following output:

(ae_core_prod@amoveo-node-01)1> sync:start().
ok
(ae_core_prod@amoveo-node-01)2> false 3
tx_pool_feeder died

Running the miner will produce the same sequence of events as explained above, immediately.

I hope this is helpful, if I can provide further detail, please let me know.

api:balance(). error if called before mine:start().

Balance error, if called before mine:start().

After running

make prod-go
make prod-attach

(ae_core_prod@HP-Z620)4> api:balance().
** exception error: {badrecord,acc}
     in function  accounts:balance/1 (/media/2TB/GIT/testing/amoveo/_build/prod/lib/ae_core/src/consensus/trees/accounts.erl, li

The error was the same after sync:start(). also

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.