forked from Qortal/qortal
Added a new step, which attempts to filter out peers that are on inferior chains, by comparing them against each other and our chain. The basic logic is as follows: 1. Take the list of peers that we'd previously have chosen from randomly. 2. Figure out our common block with each of those peers (if its within 240 blocks), using cached data if possible. 3. Remove peers with no common block. 4. Find the earliest common block, and compare all peers with that common block against each other (and against our chain) using the chain weight method. This involves fetching (up to 200) summaries from each peer after the common block, and (up to 200) summaries from our own chain after the common block. 5. If our chain was superior, remove all peers with this common block, then move up to the next common block (in ascending order), and repeat from step 4. 6. If our chain was inferior, remove any peers with lower weights, then remove all peers with higher common blocks. 7. We end up with a reduced list of peers, that should in theory be on superior or equal chains to us. Pick one of those at random and sync to it. This is a high risk feature - we don't yet know the impact on network load. Nor do we know whether it will cause issues due to prioritising longer chains, since the chain weight algorithm currently prefers them.
Qortal Project - Official Repo
Build / run
- Requires Java 11. OpenJDK 11 recommended over Java SE.
- Install Maven
- Use Maven to fetch dependencies and build:
mvn clean package
- Built JAR should be something like
target/qortal-1.0.jar
- Create basic settings.json file:
echo '{}' > settings.json
- Run JAR in same working directory as settings.json:
java -jar target/qortal-1.0.jar
- Wrap in shell script, add JVM flags, redirection, backgrounding, etc. as necessary.
- Or use supplied example shell script: start.sh
Description
Qortal Core - Main Code Repository
Decentralized Data Network - Blockchain - TRUE Cross-Chain Trading - Application and Website Hosting - Much More - Qortal is the future internet infrastructure for the global digital world.
Languages
Java
98%
JavaScript
0.6%
Shell
0.5%
HTML
0.5%
Perl
0.3%