Code Monkey home page Code Monkey logo

xgt's Introduction

XGT Logo

Sound Money & Robust Programmability

Infinite scalablilty for financial inclusion With native smart contracts and robust architecture, XGT supports up to 3,000 transactions per second and a financially-inclusive experience for all users.

Dockerized libraries for egalitarian opportunity to run full nodes: An XGT daemon can be easily run with the provided Docker images, which enables exchanges, developers and applications to integrate and run XGT with unparalled efficiency, while also embracing reliability as a key security measure. Deploying and maintaining an XGT node is simple enough that anyone can do it.

Optimal governance for egalitarian participation: XGT will be supported by an unlimited number of nodes run by developers, applications, users and miners. Miners produce the blocks that track all XGT transactions at a rate of one block every three seconds and there is no limit on the number of miners. Together these nodes provide growing decentralization and security to XGT.

Streamlined full nodes for perfect app integration: The advantage of XGT nodes is that they are extremely quick to set up, inexpensive to operate or migrate to, and highly responsive relative to other networks. Better still, the open nature of the network means that it is available to all, and participants are not subject to the behaviour of a group of insiders. Anyone can operate a full node, or mine using the open source software. XGT is built with the knowledge that the benefit of a full node designed specifically for economic purposes, knowing full well non-economic data needs to be supported by off-chain, application-based APIs for optimal performance.

GitHub Workflow Status GitHub tag (latest by date) GitHub Workflow Status (edge-client) GitHub Workflow Status (edge-protocol) Discord GitHub top language

Documents

Documentation can be found at the XGT Documentation Hub.

Usage

API Docs

Libraries

Advantages

  • Fast application and exchange integration: New streamlined blockchain infrastructure based on years of research.
  • Real-time financial inclusion: Three-second block times.
  • Decentralization: Proof of Work for network security, coin supply, and open governance.
  • Revolutionary application development: Off-chain content and on-chain reference-IDs for rewarding community engagement
  • Unlimited financial inclusion:
  • On-chain currency creation with vote-able emissions for community growth via XGT Token Trees
  • Unparalled bridging of applications and blockchain: base58 randomized wallet IDs for privacy and integration with off-chain account systems. Generated with a BTC compliant algorithm, and namespaced with XGT for user-safety

Technical Details

  • Currency symbol XGT
  • Energy System, used to power SmartContracts without coin burn
  • Proof of Work consensus
  • ~18,700,000 XGT for egalitarian distribution, 21,000,000 token supply schedule.
  • Mining halvings, targetted for sync with BTC supply halvings

Announcement

XGT was formally announced on BitcoinTalk on May 28, 2021, at 06:56 PM PST.

Installation

Getting started with XGT is fairly simple. You can either choose to use docker-images, build with docker manually or build from source directly. All steps have been documented and while many different OS are supported, the easiest one is Ubuntu 20.04.

Quickstart

Just want to get up and running quickly? We have pre-built Docker images for your convenience. More details are in our Mining XGT Guide.

Building

We strongly recommend using one of our pre-built Docker images or using Docker to build XGT. Both of these processes are described in the Mining XGT.

To build from source, we also have build instructions for Linux (Ubuntu 20.04 LTS) and macOS.

Dockerized Mining

See Mining XGT

CLI Wallet

We provide a basic cli wallet for interfacing with xgtd. The wallet is self-documented via command line help. See xgt-ruby

System Requirements

4GB memory (16GB recommended) x86 or AMD64 compatible CPU

No Support & No Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

xgt's People

Contributors

liamnoroian avatar obskein avatar raggi avatar shiftreset avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xgt's Issues

Reduce block generation rate

In order to smooth out block production performance rate,
Difficulty should be adjusted every 2016 blocks.

Given the current difficult adjustment period is 2016*150,
Then the adjustment period should be 2016 blocks.

Enable multi-threading on miners

Current mining is single threaded, to be more efficient on network/disk/memory, allow multiple mining threads, configured via config.ini

The following code needs to be added to void witness_plugin::plugin_initialize(const boost::program_options::variables_map& options) in /libraries/plugins/witness/witness.cpp

   if( options.count("mining-threads") )
   {
      _mining_threads = std::min( options["mining-threads"].as<uint32_t>(), uint32_t(64) );
      _thread_pool.resize( _mining_threads );
      for( uint32_t i = 0; i < _mining_threads; ++i )
         _thread_pool[i] = std::make_shared<fc::thread>();
   }

Reduce log output

It's consuming a lot of disk space, and is pretty verbose during normal operation.

Improve log messaging output

The error message:

    {"name":"XGT...","what":"unknown key"}
    database.cpp:616 get_account
3061638ms database.cpp:1073             notify_pre_apply_tra ] Caught exception in plugin: 13 N5boost10wrapexceptISt12out_of_rangeEE: unknown key
unknown key:
    {"name":"XGT8CW6Pk3wDAwwEGbMZhXo2RvfztV9gGzT2ByN78DG","what":"unknown key"}
    database.cpp:616 get_account
rethrow
    {}```

Should produce a smoother log output, or none at all.

Nakamoto difficulty not working as intended; replace difficulty logic

Adjust difficulty every two weeks, according to the nakamoto difficulty adjustment routine.

The pseudo code for this is as follows:


if (timespan < targetTimespan / 4) 
  timespan = targetTimespan / 4
if (timespan > targetTimespan * 4)
  timespan = targetTimespan  * 4

newDifficulty = (lastBlockDifficulty * actualTimespan) / targetTimespan;

if (newDifficulty > powLimit)
  newDifficulty = powLimit;

Based on this code from bitcoin-core:

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
{
    if (params.fPowNoRetargeting)
        return pindexLast->nBits;

    // Limit adjustment step
    int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
    if (nActualTimespan < params.nPowTargetTimespan/4)
        nActualTimespan = params.nPowTargetTimespan/4;
    if (nActualTimespan > params.nPowTargetTimespan*4)
        nActualTimespan = params.nPowTargetTimespan*4;

    // Retarget
    const arith_uint256 bnPowLimit = UintToArith256(params.powLimit);
    arith_uint256 bnNew;
    bnNew.SetCompact(pindexLast->nBits);
    bnNew *= nActualTimespan;
    bnNew /= params.nPowTargetTimespan;

    if (bnNew > bnPowLimit)
        bnNew = bnPowLimit;

    return bnNew.GetCompact();
}

XGTVM Integration hub ticket

Outstanding items pertaining to XGTVM implementation

Outstanding items regarding the XGTVM & supporting infrastructure:

Indices

  • SStore
  • Receipt objects

Side effects

  • Log 0-4

PR

#59

Adapter methods:

  • sha3
  • getbalance
  • get code hash
  • get block hash
  • self destruct
  • contract return
  • Set storage
  • Access storage
  • Revert
  • contract create 2
  • contract static call
  • delegate
  • call code
  • contract regular call

blacklist?

Hello,
I have an issue with the miner, somehow I got disconnected from all peers after a few minutes, and all the blocks I find are never taken into account by the network.
This is one of the message I get:
image

And I got this message for every bloc I find.
I made like 1 xgt in 3 days with a 3900X
Is it possible that my ip got blocked by peers?

Multi threaded miner crashes

Miner crashes
Installation info:

XGT Version: 1.3.0
Platform: Ubuntu 20.04
Storage backend: BMIC
# Threads: 90

Crash Trace

5PFnXNV9u -- Block Time Offset: 309 ms
658324ms witness_plugin.cpp:344        start_mining         ] Miner working at block 1328634 rate: 172654141H/s
658375ms witness_plugin.cpp:344        start_mining         ] Miner working at block 1328634 rate: 173986168H/s
658425ms witness_plugin.cpp:344        start_mining         ] Miner working at block 1328634 rate: 175135438H/s
658477ms witness_plugin.cpp:344        start_mining         ] Miner working at block 1328634 rate: 174469322H/s
658481ms witness_plugin.cpp:257        mine_rounds          ] Miner found a solution with 16093670380552072248!
658502ms witness_plugin.cpp:315        start_mining         ] Broadcasting...
658502ms witness_plugin.cpp:318        start_mining         ] Mined block proceeding #1328634 with timestamp 2021-07-06T18:10:58 at time 2021-07-06T18:10:58
658513ms database.cpp:837              _push_block          ] Pushing new block #1328635 from XGT2iJ45vibYdMczNQLqXbvQMNb6vAtTcY9okRoaPF6 with timestamp 2021-07-06T18:10:58 at time 2021-07-06T18:10:58
stack trace:
658515ms p2p_plugin.cpp:774            broadcast_block      ] Broadcasting block #1328635
  0x000055ea44e88c04 ../programs/xgtd/xgtd : +0xd36c04
  0x00007f4a27f6d3c0 /lib/x86_64-linux-gnu/libpthread.so.0 : +0x153c0
  0x000055ea4450568e ../programs/xgtd/xgtd : +0x3b368e
  0x000055ea44506e43 ../programs/xgtd/xgtd : +0x3b4e43
  0x000055ea44507068 ../programs/xgtd/xgtd : +0x3b5068
  0x000055ea44b4e357 ../programs/xgtd/xgtd : +0x9fc357
  0x000055ea44c8ffba ../programs/xgtd/xgtd : +0xb3dfba
  0x000055ea44e6f144 ../programs/xgtd/xgtd : +0xd1d144
  0x000055ea44871c25 ../programs/xgtd/xgtd : +0x71fc25
  0x000055ea44872267 ../programs/xgtd/xgtd : +0x720267
  0x000055ea44824dcb ../programs/xgtd/xgtd : +0x6d2dcb
  0x00007f4a27e41de4 /lib/x86_64-linux-gnu/libstdc++.so.6 : +0xd6de4
  0x00007f4a27f61609 /lib/x86_64-linux-gnu/libpthread.so.0 : +0x9609
  0x00007f4a27b2f293 /lib/x86_64-linux-gnu/libc.so.6 : clone+0x43
executing command:
addr2line -p -a -f -C -i -e /home/miner/xgt-build/programs/xgtd/xgtd 000055ea44e885ef 000055ea44e88c04 00007f4a27f6d3c0 000055ea4450568e 000055ea44506e43 000055ea44507068 000055ea44b4e357 000055ea44c8ffba 000055ea44e6f144 000055ea44871c25 000055ea44872267 000055ea44824dcb 00007f4a27e41de4 00007f4a27f61609 00007f4a27b2f293
0x000055ea44e885ef: ?? ??:0
0x000055ea44e88c04: ?? ??:0
0x00007f4a27f6d3c0: ?? ??:0
0x000055ea4450568e: ?? ??:0
0x000055ea44506e43: ?? ??:0
0x000055ea44507068: ?? ??:0
0x000055ea44b4e357: ?? ??:0
0x000055ea44c8ffba: ?? ??:0
0x000055ea44e6f144: ?? ??:0
0x000055ea44871c25: ?? ??:0
0x000055ea44872267: ?? ??:0
0x000055ea44824dcb: ?? ??:0
0x00007f4a27e41de4: ?? ??:0
0x00007f4a27f61609: ?? ??:0
0x00007f4a27b2f293: ?? ??:0

the project is dead?

Hello!

everything is in the title,
there is no longer any way to mine, and no access to our wallet,

what is the problem?

Docker release protocol updates

Let's make docker better for all!

The instructions at https://xgt-network.github.io/mining/ still refer to version :1.0.7, not the latest version. I'd suggest the latest version of the docker always get tagged as :latest as well, and the instructions updated to refer to :latest instead

  • Update docs for docker per a suggestion from sharky:

With docker you can use -v ${PWD}/xgt-chainstate-0:/home/root/xgt-chainstate-0 or similar to mount a volume mapped to a directory on your host machine, this will let the blockchain data persist even if you remove the docker container and start again

...stop building in the docker image too, just COPY in a binary from CI and only install the necessary deps

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.