Git Product home page Git Product logo

cyberway.cdt's Introduction


CyberWay — the Most Powerful Infrastructure for Decentralized Applications

Welcome to the CyberWay source code repository! CyberWay is a EOS fork with some major improvements.

buildkite GitHub

Welcome to the CyberWay source code repository! This software enables businesses to rapidly build and deploy blockchain-based applications.


Official Testnet

testnet.cyberway

Supported Operating Systems

CyberWay currently supports the following operating systems:

  1. Ubuntu 16.04
  2. Ubuntu 18.04
  3. MacOS Darwin 10.12 (or later versions)
  4. CentOS 7
  5. Fedora 25 (or later version)
  6. Mint 18

Note:
It may be possible to install CyberWay on other Unix-based operating systems.


Getting Started

We appreciate your interest in contributing to the CyberWay platform! We always welcome contributions from our community to make our code and docs better.

For newcomers to CyberWay, it is recommended first to read the manuals Creating Wallet and Keys for Development and Mainnet. Installation Guide. An advanced developer or a validator may need the following steps.

To install CyberWay

  1. Clone CyberWay sources. The latest CyberWay version is v2.0.3.

  2. Run the node:

./start_light.sh

To upgrade CyberWay from v2.0.2 to v2.0.3

  1. Download the docker image cyberway/cyberway:v2.0.3:
sudo docker pull cyberway/cyberway:v2.0.3
  1. Download the last version of docker-compose.yml from the GitHub
sudo curl https://raw.githubusercontent.com/cyberway/cyberway.launch/master/docker-compose.yml --output /var/lib/cyberway/docker-compose.yml
  1. Restart the nodeos container:
cd /var/lib/cyberway
sudo env EXTRA_NODEOS_ARGS="--replay-blockchain" docker-compose up -t 120 -d

More information about CyberWay

Devportal

Community

Telegram:

Twitter:

cyberway.cdt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cyberway.cdt's Issues

Remove obsolete intrinsics

The following intrinsics should be removed:

  • get_bw_cpu_limit
  • get_bw_net_limit
  • is_provided_bw_confirmed
  • set_bw_limits
  • confirm_bw_limits
  • get_ram_provider
  • save_record
  • lookup_record

multi-index erase does not work correctly

tables::vote_table vote_table(_self, message_id.author.value);
auto votetable_index = vote_table.get_index<"messageid"_n>();
auto vote_itr = votetable_index.lower_bound(mssg_itr->id);
while ((vote_itr != votetable_index.end()) && (vote_itr->message_id == mssg_itr->id))
    vote_itr = votetable_index.erase(vote_itr);

Implement composite keys for multi_index

CyberWay already has functionality to support composite keys:

eosio::multi_index<N(orders), limit_order,
   indexed_by< N(byexp),   const_mem_fun<limit_order, uint64_t, &limit_order::get_expiration> >,
   indexed_by< N(byprice), composite_key<
          member<limit_order, int64_t, &limit_order::price>,
          member<limit_order, int64_t, &limit_order::uid> > > >
  ...

All what is need to implement templates tuples likes in source code of CyberWay:
https://github.com/GolosChain/cyberway/blob/550cb5f1c21b8998e02c2106802e62e5880c6c70/libraries/chain/include/cyberway/chaindb/multi_index.hpp#L119-L202

get table rows fails with `integer literal owerflow`

IMPACT: can't get some rows through cleos

STR:

  1. Start testnet with Golos genesis-data
  2. Execute: cleos get table gls.publish gls.publish rewardpools

Actual result:
Command fails with:

error 2019-05-16T04:54:18.835 thread-0  main.cpp:3760                 main                 ] Failed with error: Parse Error (4)
integer literal overflow


Error parsing object
Error parsing object
Attempting to parse array []
Error parsing object

Expected result:
Command executes successfully

Additional information:
Problem on cleos side. Wireshark get next TCP-session data:
Request:

POST /v1/chain/get_table_rows HTTP/1.0
Host: cyber-private:8888
content-length: 200
Accept: */*
Connection: close

{"json":true,"code":"gls.publish","scope":"gls.publish","table":"rewardpools","lower_bound":null,"upper_bound":null,"limit":10,"index":"primary","encode_type":"dec","reverse":false,"show_payer":false}

Answer from server:

HTTP/1.1 200 OK
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 1526
Content-type: application/json
Server: WebSocket++/0.7.0

{"rows":[{"created":0,"rules":{"mainfunc":{"code":{"varssize":1,"operators":[0],"values":[{"kind":1,"idx":0}],"nums":[],"consts":[]},"maxarg":"9223372036854771712"},"curationfunc":{"code":{"varssize":1,"operators":[0,0,0,0,26,4,0,1,4],"values":[{"kind":0,"idx":0},{"kind":0,"idx":1},{"kind":1,"idx":0},{"kind":0,"idx":2},{"kind":0,"idx":3}],"nums":["9223372036854771712","16384000000000000",409,4096],"consts":[]},"maxarg":"9223372036854771712"},"timepenalty":{"code":{"varssize":1,"operators":[0,0,4],"values":[{"kind":1,"idx":0},{"kind":0,"idx":0}],"nums":[7372800],"consts":[]},"maxarg":7372800},"maxtokenprop":5000},"state":{"msgs":56793,"funds":{"amount":249427023,"decs":3,"sym":"GOLOS"},"rshares":3101862649108767483796868986936984105,"rsharesfn":3101862649108767483796868986936984105}},{"created":"1557924168000000","rules":{"mainfunc":{"code":{"varssize":1,"operators":[0],"values":[{"kind":1,"idx":0}],"nums":[],"consts":[]},"maxarg":"9223372036854771712"},"curationfunc":{"code":{"varssize":1,"operators":[0,0,0,0,26,4,0,1,4],"values":[{"kind":0,"idx":0},{"kind":0,"idx":1},{"kind":1,"idx":0},{"kind":0,"idx":2},{"kind":0,"idx":3}],"nums":["9223372036854771712","16384000000000000",409,4096],"consts":[]},"maxarg":"9223372036854771712"},"timepenalty":{"code":{"varssize":1,"operators":[0,0,4],"values":[{"kind":1,"idx":0},{"kind":0,"idx":0}],"nums":[7372800],"consts":[]},"maxarg":7372800},"maxtokenprop":5000},"state":{"msgs":0,"funds":{"amount":0,"decs":3,"sym":"GOLOS"},"rshares":0,"rsharesfn":0}}],"more":false}```

Loading big number of objects from chaindb

Currently, multi-index has cache of loaded objects and store them in std::vector.
To find object, it iterates over vector
https://github.com/GolosChain/cyberway.cdt/blob/df1f9012dc5cda634a771bc25372e78b7d94d52d/libraries/eosiolib/multi_index.hpp#L825-L831

It works good on a small number of objects, but it is hard on a big number.

O(n) = n^2 / 2

It is better to implement strategy with storing a small number of objects in std::vector, and a big number of objects in std::map

Refactor cyberway.cdt cmake modules

Currently, cyberway.cdt cmake modules install at the same places as were in eosio.cdt.
It conflicts with cmake modules from eosio.cdt.

Steps to fix:

  • rename modules
  • rename directories

eoslib's get_active_producers() returns wrong vector

eoslib's get_active_producers() is filling vector such way using wasm-interface's same-named method:

     std::vector<name> active_prods(prod_cnt);
     get_active_producers((uint64_t*)active_prods.data(), active_prods.size());

wasm-interface's method uses memcpy, therefore it needs byte size of vector, not size().

LOW priority because this method is not used anywhere, afaik

Add weak_require_auth

weak_require_auth() works like require_auth()- it checks signature in transaction and mark it as used.
Main difference that it doesn't break contract execution. It only returns fail result.

Comparing with has_auth() - the has_auth() doesn't mark signature as used.

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.