Giter VIP home page Giter VIP logo

xdagj's Introduction

Welcome to XDAGJ

FOSSA Status GitHub release (latest SemVer) GitHub GitHub issues

中文版

Directory

System environment

JDK: v17
Maven: v3.9.1

JDK 17 Download

Eclipse Temurin™ 17 Latest Releases(https://adoptium.net/temurin/releases/)

Maven 3.9.1 Download

Apache Maven 3.9.x Latest Releases(https://maven.apache.org/download.cgi)

Installation and usage

The XDAGJ Testnet Tutorial can help you quickly access XDAGJ testnet by using wallets and mining functions. The Private Chain Building Tutorial helps you to build a private-chain for testing XDAGJ and finding bugs.

XDAGJ_TestNet_Tutorial

XDAGJ_Devnet_Tutorial

XDAGJ TestNet Explorer

Develop

XDAGJ has basic pool functions. Follow-up work will improve system stability and add new functions. The goal is to prepare XDAG for entry into the metaverse. It is important to adopt excellent blockchain technology.

XDAG Mars Project

Four stages:

Exploration phase: XDAGJ testnet is online (online, in beta)

  • Deploy XDAGJ test network environment, open beta

  • Implement the RandomX algorithm

  • Implement the libp2p network protocol

  • Testnet blockchain browser

  • Test coin acquisition

Landing phase: XDAGJ mainnet is online

  • Add test cases: write test cases for existing functions

  • Add log functions: provide a relatively complete log service to facilitate troubleshooting

  • Optimize synchronization protocol: ameliorate the existing synchronization protocol and improve synchronization efficiency

  • Implement the snapshot function: reduce the cost of running a mining pool and boost the loading process

  • Implement the RPC function: access Web3j, realize the standardization of the interface

  • Introduce the Stratum protocol for miners

  • Lightweight wallet application: join the browser wallet

  • Standardize the format of public and private keys, follow the BIPXX specification, and add mnemonic words to generate public and private key pairs

Expansion phase: XDAGJ & XRC

  • Improve the address block structure

  • Increase the handling fee

  • Optimize wallets to improve the user experience

  • Support XRC standards

  • Decrease the threshold of mining pool users

  • Open the whitelist to achieve complete decentralization

Prosperity phase: XDAGJ & DeFi

  • Implement cross-chain protocols, compatible with access to multiple blockchain systems, to achieve intercommunication between XDAG and other chain worlds

  • Implement the oracle function

  • Join a distributed exchange

Code

  • Git

    We use the gitflow branch model

    • master is the main branch, which is also used to deploy the production environment. Cannot modify the code directly at any time.
    • develop is the development branch, always keep the latest code after completion and bug fixes.
    • feature is a new feature branch. When developing new features, use the develop branch as the basis, and create the corresponding feature/xxx branch according to the development characteristics.
    • release is the pre-launch branch. During the release test phase, the release branch code will be used as the benchmark test. When a set of features is developed, it will be merged into the develop branch first, and a release branch will be created when entering the test. If there is a bug that needs to be fixed during the testing process, it will be directly fixed and submitted by the developer in the release branch. When the test is completed, merge the release branch to the master and develop branches. At this time, the master is the latest code and is used to go online.
    • hotfix is the branch for repairing urgent problems on the line. Using the master branch as the baseline, create a hotfix/xxx branch. After the repair is completed, it needs to be merged into the master branch and the develop branch.
  • Commit Message

    The submission message must begin with a short subject line, followed by an optional, more detailed explanatory text, which should be separated from the abstract by a blank line.

  • Pull Request

    The pull request must be as clear and detailed as possible, including all related issues. If the pull request is to close an issue, please use the Github keyword convention close, fix, or resolve. If the pull request only completes part of the problem, use the connected keyword. This helps our tool to correctly link the issue to the pull request.

  • Code Style

    Use the formatter_eclipse.xml or formatter_intellij.xml of the xdagj code style in the misc/code-style folder.

  • Code Review

    We value the quality and accuracy of the code. Therefore, we will review all of the code that needs to be changed.

FAQ

Contribution

  • Security Question

    XDAGJ is still in the process of large-scale development, which means that there may be problems with existing codes or protocols, or errors that may exist in practice. If you find a security problem, we hope you can report it back as soon as possible.

    If you find a problem that may affect the security of the deployed system, we hope that you can send the problem privately to [email protected]. Please do not discuss it publicly!

    If the problem is a weakness of the agreement or does not affect the online system, it can be discussed publicly and posted to issues.

  • Features

    We are very happy to add more useful and interesting new features to XDAGJ. You can suggest any interesting new features that you think would be beneficial.

    If you are interested in the development of XDAGJ, we also welcome you to join the developer team and contribute your strength to XDAGJ. You can get in touch with us at [email protected].

Sponsorship

Since the launch of the Apollo Project, XDAGJ has made a significant breakthrough from 0 to 1. The development of XDAGJ has been on the right track. Your support can drive the successful implementation of XDAGJ technology. XDAG:BkcVG4i1BfxUJLdNPdctaCReBoyn4j32d

Other

XDAGJ New Address Structure

XDAGJ Libp2p Introduction

XDAG Wiki

XDAG Whitepaper

XDAG Protocol

License

FOSSA Status

xdagj's People

Contributors

chase316 avatar cherry1603 avatar cmyyuange avatar dependabot[bot] avatar dkrsgood avatar fossabot avatar garlicnezha avatar junze888 avatar lucasmlk avatar myronx avatar punk8 avatar qixuan123456 avatar wawa1996 avatar xdager avatar xrdavies avatar yyajphd 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

xdagj's Issues

BUG : Signature Verification

There are problems with the signature verification process

OS version : [MacOS BigSur 11.1.2]
XDAGJ version : [XDAGJ-0.4.2]
JDK version : [JDK15.0.2]

In the absence of the other party's private key, transactions belonging to the other party can be generated and verified using only the public key

Feature : Transaction confirmation takes too long

*Describe the new features you want to add
Describe in detail the interesting features you want to achieve.[eg. Hope that XDAGJ will join the virtual machine function so that we can customize our own smart contract]

Feature : Supporting mnemonic words

  1. Support generating mnemonic words to save the key
  2. Support import mnemonic words to generate keys
  3. Support the conversion of wallet.data and private key HEX
  4. Support import private key HEX to wallet

BUG : Old wallet convert issue

old wallet.dat from C node generate, use password and random params, If these two parameters are not included, an invalid wallet conversion will occur

Transfer amount problem

1.Transfer issues: When there are input areas where the transfer amount needs to be greater than or equal to 6 as input blocks, it will cause the fields of a transaction block to not store information such as input and signature, resulting in an abnormal transaction block.
2. When transferring money, a transaction requires multiple transaction blocks to publish, but only one transaction block will be broadcast, resulting in only one transaction amount that is actually received.

Accuracy problem

Need to reconsider and adjust the accuracy of the amount calculation

BUG : Two java mining pools cannot be completed synchronously

Title
Briefly describe your problem

Software information (please complete the following information)

  • OS version : [eg. MacOS BigSur 11.1.2]
  • XDAGJ version : [eg. XDAGJ-0.4.1-Aplha]
  • JDK version : [eg. JDK15.0.2]

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
What actually happened

Log
Provide detailed logs so that we can troubleshoot problems.

Can Reproduce(option)
If can ,If you can, please tell us the detailed steps:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additional context
Add any other context about the problem here.

BUG : can't run on macbook pro m1

can't run any commands

sh xdag.sh -d --account init

8月 05, 2022 11:16:43 下午 org.apache.commons.beanutils.FluentPropertyBeanIntrospector introspect
信息: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int io.xdag.crypto.jni.Native.load_dnet_keys(byte[], int)'
	at io.xdag.crypto.jni.Native.load_dnet_keys(Native Method)
	at io.xdag.config.AbstractConfig.initKeys(AbstractConfig.java:197)
	at io.xdag.Launcher.buildConfig(Launcher.java:165)
	at io.xdag.cli.XdagCli.start(XdagCli.java:160)
	at io.xdag.cli.XdagCli.main(XdagCli.java:149)
	at io.xdag.cli.XdagCli.main(XdagCli.java:156)
	at io.xdag.Bootstrap.main(Bootstrap.java:32)

**Software information **

  • OS version : MacOS 12.5 M1
  • XDAGJ version : XDAGJ-0.4.9
  • JDK version : JDK17.0.4
  • Maven version : v3.8.6

BUG : Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist!

Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist!

when I compile xdagj and use
nohup java -jar --enable-preview xdagj-0.4.0-shaded.jar > xdagj.log 2>&1 &
run the test net or main net ,It crashes.

Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist!
at cn.hutool.core.io.resource.ClassPathResource.initUrl(ClassPathResource.java:122)
at cn.hutool.core.io.resource.ClassPathResource.(ClassPathResource.java:74)
at cn.hutool.core.io.resource.ClassPathResource.(ClassPathResource.java:34)
at cn.hutool.core.io.resource.ResourceUtil.getResourceObj(ResourceUtil.java:199)
at cn.hutool.setting.Setting.(Setting.java:128)
at cn.hutool.setting.Setting.(Setting.java:116)
at cn.hutool.setting.Setting.(Setting.java:106)
at io.xdag.config.AbstractConfig.getSetting(AbstractConfig.java:207)
at io.xdag.config.AbstractConfig.(AbstractConfig.java:153)
at io.xdag.config.TestnetConfig.(TestnetConfig.java:32)
at io.xdag.Launcher.buildConfig(Launcher.java:102)
at io.xdag.cli.XdagCli.start(XdagCli.java:126)
at io.xdag.cli.XdagCli.main(XdagCli.java:59)
at io.xdag.cli.XdagCli.main(XdagCli.java:66)
at io.xdag.Bootstrap.main(Bootstrap.java:36)

How can i fix this problem?
I follow this tutorial step by step:
https://github.com/XDagger/xdagj/blob/master/docs/XDAGJ_Private_Chain_Tutorial_eng.md
Can anyone help me ?

Feature : Add a verification step to the TERMINATE command line

Add a verification step to the TERMINATE command line
Once the terminate command is accidentally entered, the system will stop running, adding verification steps can effectively prevent misoperations.
For example, password verification can be performed when using the terminate command, and the program can be terminated only if the verification is passed

Feature : Add stratum protocol support

Describe the new features you want to add
Add the stratum protocol to the mining pool to provide a better mining experience and support more types of miners

BUG : Synchronization problem

Synchronization problem

  • OS version : MacOS BigSur 11.1.2
  • XDAGJ version : XDAGJ-0.4.2
  • JDK version : JDK15.0.2

Pool synchronization is mainly divided into two scheme, one is obtained in batches based on checksum, which belongs to the synchronization from the starting block to the latest block, and the other is to request from the latest block. The second scheme is abnormal.

Suggestions: too many transaction blocks are generated when the block reward is distributed

Pool will distribute rewards to each miner, and a large number of transaction blocks will be generated for each epoch.
The idea of ​​the solution is as follows:
1)The reward amount less than 10^-9 will not be paid;
2)Each miner reward reaches 1 XDAG before paying;
3)The miner's offline time is greater than the specified time, the reward will be cleared.

Looking for a develepment roadmap

I have some time to do some contribute, but there is no develepment roapmap in this repo, can communities offer a roadmap so that other develeper like me can join the xdagj more easily?

BUG : Synchronization issues

C version and java version have a synchronization bug problem, positive and negative synchronization in some specific cases will appear inconsistent.

//|--epoch 1-----|-----epoch 2-----|-----epoch 3-----|
//------A <-------- B <-------- C
//-------------------------|
//-------------------------|------------- D

Stop wallet to mine XDAGs

Title
stop wallet to mine xdag

Software information (please complete the following information)

  • OS version : [eg. MacOS BigSur 11.1.2]
  • XDAGJ version : [eg. XDAGJ-0.4.1-Aplha]
  • JDK version : [eg. JDK15.0.2]

Describe the bug
When a wallet connects a pool, the pool will give little XDAGs to the wallet and generate transactions every minute.

Expected behavior
The pool should not give XDAGs to the wallet as a reward. The pool should close the TCP immediately after the wallet checks the balance, sends the transaction, and confirms the transaction.

Actual behavior
When a wallet connects a pool, the pool will give little XDAGs to the wallet and generate transactions every minute.

Log
Provide detailed logs so that we can troubleshoot problems.

Can Reproduce(option)
If can ,If you can, please tell us the detailed steps:

  1. Go to 'www.xdag.io'
  2. Download a windows version wallet
  3. Connects to the pool
  4. See error

Additional context
Add any other context about the problem here.

Creating a XFS ( XDAG Funding System)

What is XFS?

The XDAG Funding System is a tool that automates the process of rewards. A contributor should be able to create a proposal, upload and edit a proposal. The proposal should consist of the following:

  1. General task description.
  2. Milestones with detailed tasks to be finished.
  3. Timeline which details an estimated amount of time spent on each
    task.
  4. Start and end date for the proposal, and each milestone.
  5. Amount of funds required.

Each proposal will be split into a minimum of 2 milestones.
Milestones and proposals must have a status:

  1. work-in-progress, 2. in-progress, 3.finished, 4. requires-review, 5. requires-revision.

The definition of these statuses are fairly easy to understand. Payment should only be made once a milestone has been finished with two or more favourable reviews. The community should be able to review proposals, and ask for revisions to current in-progress or under review proposals. Once a proposal has been finished, the remaining funds should be rewarded.

Features include:

  1. Easy overview of proposals and their status.
  2. Each proposal has its own page with an interface showing relevant information.
  3. WYSIWYG text editor which supports Markdown formatting.
  4. Funds should be held in escrow. Automatic payment per milestone upon finished review.
  5. A review system where each user has the ability to comment, rate, and ask for revisions. The user should also have some form of trust factor.
    A higher rank of trust weighs more than a low rank trust. Trust factorneed not be shown to the end user.
    A clear and concise description of what you want to happen.

Prerequisites & implementation

In this section, I will try to detail what is needed before XFS can be implemented on XDAG.io.

3.1 Prerequisites

  1. XDAG RPC.

3.2 Implementation
In this section, I will detail an outline of the preferred implementation.

  1. Develop XFS using an object-oriented programming language, such as Python, C++, or Java. The XFS should also have a frontend.
  2. The XFS code must be made publicly available as open source.
  3. XFS should call the XDAG RPC for payments and balance refreshing.
  4. The wallet should be kept in cold storage and not accessed by third parties for payouts.
  5. XFS should be hosted separately from the XDAG node.
  6. XFS should have a simple UI similar to the block explorer.
  7. Automated wallet and address creation. Suggested methods:
    (a) A new wallet with a new address for each proposal.
    (b) The same wallet, but with a new address for each proposal.
    (c) The same wallet with the same address for each proposal, with a different Tx remark for each proposal.

link to the original file from Mathsw : https://drive.google.com/file/d/1gQysWuuZ3WiT28vAvwFVDxyLMzZa7eq2/view?usp=sharing

Feature : EVM Support

The biggest source of Ethereum on the chain and the success of smart contracts, we see that the key to the success of the Ethereum ecosystem is the creation of an EVM virtual machine. At present, the realization of a virtual machine is very important for XDAG. The reasons are as follows:

  1. The throughput of Ethereum L1 15 tps/s causes high handling fees (>10$), which greatly limits the development of DAPP
  2. Ethereum 2.0 POS has not yet determined the specific launch date, which has a great degree of delay risk and security risk (the topic of POW vs POS is a cliché, not to argue here, but we believe that POW is more secure)
  3. XDAG has a natural high TPS design, and POW safety design, and has a good foundation for the development of higher performance DAPP

EVM Illustrated

ethereum evm illustrated-1

EVM INSTRUCTIONS

The EVM executes as a stack machine with a depth of 1024 items. Each item is a 256-bit word, which was chosen for the ease of use with 256-bit cryptography (such as Keccak-256 hashes or secp256k1 signatures).

During execution, the EVM maintains a transient memory (as a word-addressed byte array), which does not persist between transactions.

Contracts, however, do contain a Merkle Patricia storage trie (as a word-addressable word array), associated with the account in question and part of the global state.

Compiled smart contract bytecode executes as a number of EVM opcodes, which perform standard stack operations like XOR, AND, ADD, SUB, etc. The EVM also implements a number of blockchain-specific stack operations, such as ADDRESS, BALANCE, KECCAK256, BLOCKHASH, etc.
ethereum evm illustrated-2

Feature : No transaction history

*Describe the new features you want to add
Describe in detail the interesting features you want to achieve.[eg. Hope that XDAGJ will join the virtual machine function so that we can customize our own smart contract]

Feature :

Add global hashrate calculation function

BUG : Signature verification failed for some blocks

Title
Briefly describe your problem

Software information (please complete the following information)

  • OS version : [eg. MacOS BigSur 11.1.2]
  • XDAGJ version : [eg. XDAGJ-0.4.1-Aplha]
  • JDK version : [eg. JDK15.0.2]

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
What actually happened

Log
Provide detailed logs so that we can troubleshoot problems.

Can Reproduce(option)
If can ,If you can, please tell us the detailed steps:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additional context
Add any other context about the problem here.

Refactor : Bytes Operation Refactor

Problem Description
There are many places to manipulate byte arrays in the code, and many third-party tools are used, which makes developers extremely prone to errors when operating. It is recommended to use a unified bytecode manipulation tool to facilitate large-scale use in the future.

Suggestion(option)
Apache tuweni toolkit structured many blockchain byte manipulation toolkits, such as hash using 32 bytes, Bytes32, MutableBytes32 and other very useful tools. It is recommended to use this tool to refactor the code.

BUG : Synchronization bug

Libp2p network will connect itself, resulting in abnormal synchronization.
Constantly asking for blocks that are not available to yourself, resulting in synchronization failure

BUG : Pow thread is closed abnormally

Title
Briefly describe your problem

Software information (please complete the following information)

  • OS version : [eg. MacOS BigSur 11.1.2]
  • XDAGJ version : [eg. XDAGJ-0.4.1-Aplha]
  • JDK version : [eg. JDK15.0.2]

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
What actually happened

Log
Provide detailed logs so that we can troubleshoot problems.

Can Reproduce(option)
If can ,If you can, please tell us the detailed steps:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additional context
Add any other context about the problem here.

Feature : Sync cache optimization

*Describe the new features you want to add
Describe in detail the interesting features you want to achieve.[eg. Hope that XDAGJ will join the virtual machine function so that we can customize our own smart contract]

BUG :

There are problems with the signature verification process

  • OS version : [MacOS BigSur 11.1.2]
  • XDAGJ version : [XDAGJ-0.4.2]
  • JDK version : [JDK15.0.2]

In the absence of the other party's private key, transactions belonging to the other party can be generated and verified using only the public key

BUG : XDAGJ Synchronization problem

Synchronization problem

OS version : [MacOS BigSur 11.1.2]
XDAGJ version : [XDAGJ-0.4.2]
JDK version : [JDK15.0.2]

There may be a problem that a certain height block is missing. When the block is not referenced by the main block and the main block, it may be missing.

Display problem

The total number of global variable blocks namin will not decrease when switching the main chain, it will show the total number of blocks before

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.