forked from Qortal/qortal
Chunk hashes are now stored off chain in a metadata file. The metadata file's hash is then included in the transaction. The main benefits of this approach are: 1. We no longer need to limit the total file size, because adding more chunks doesn't increase the transaction size. 2. This increases the chain capacity by a huge amount - a 512MB file would have previously increased the transaction size by 16kB, whereas it now requires only an additional 32 bytes. 3. We no longer need to use variable difficulty; every transaction is the same size and so the difficulty can be constant no matter how large the files are. 4. Additional metadata (such as title, description, and tags) can ultimately be stored in the metadata file, as apposed to using a separate transaction & resource. 5. There is also scope for adding hashes of individual files into the metadata file, if we ever wanted to allow single files to be requested without having to download and build the entire resource. Although this is unlikely to be available in the short term. The only real negative is that we now how to fetch the metadata file before we know anything about the chunks for a transaction. This seems to be quite a small trade off by comparison. Since we're not live yet, there is no backwards support for on-chain hashes, so a new data testchain will be required. This hasn't been tested outside of unit tests yet, so there will likely be several fixes needed before it is stable.
Qortal Data Node
Important
This code is unfinished, and we haven't had the official genesis block for the data chain yet. Therefore it is only possible to use this code if you first create your own test chain. I would highly recommend waiting until the code is in a more complete state before trying to run this.
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%