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.
Go to file
catbref 42bd68230b Cancel reward-shares with NEGATIVE share instead of ZERO. Also: bug-fixes!
Now reward-shares with zero percent are valid, to allow the 'recipient' party to gain
"number of minted blocks" but no actual block reward.

Correspondly, the special zero share used to cancel reward-shares has been changed to
be any negative value.

Block rewards, founder 'leftovers': if founder is minter account in any online
reward shares, then the per-founder-share is spread across their online reward-shares,
otherwise it's simply/wholy given to that founder.

Created a new DB table to hold "next block height", updated via triggers on Blocks.
This is so various sub-queries can simply read the next-block-height value instead
of complex IFNULL(MAX(height),0)+1 or SELECT height FROM Blocks ORDER BY height DESC.
Prior code was also broken in edge cases, e.g. no genesis block, or ran slow.

Added tests to cover above.

Deleted BTC tests as they're obsolete.

Added/improved other tests.
2019-12-11 13:40:42 +00:00
lib/org/ciyam/at Bump HSQLDB from svn r5970 to release v2.5.0 2019-08-02 13:05:18 +01:00
src Cancel reward-shares with NEGATIVE share instead of ZERO. Also: bug-fixes! 2019-12-11 13:40:42 +00:00
.gitignore Updated .gitignore 2019-11-26 10:20:06 +00:00
log4j2.properties Fix case-typo in log4j2.properties 2019-11-26 08:57:04 +00:00
pom.xml Bump version to 1.0. Bump BC to 1.64, Jetty to 9.4.22 2019-11-12 15:05:39 +00:00
README.md add Qortal Project to title 2019-09-29 17:13:27 -07:00

((Qora2)) - Qortal Project - Official Repo

To use:

  • Use maven to fetch dependencies.
  • Build project.
  • Build v1feeder.jar as a fatjar using src/v1feeder.java as the main class
  • Fire up an old-gen Qora node.
  • Use v1feeder.jar to migrate old Qora blocks to DB:

java -jar v1feeder.jar qora-v1-node-ip

You should now be able to run all the JUnit tests.

You can also examine the migrated database using HSQLDB's "sqltool".

It's a good idea to install "rlwrap" (ReadLine wrapper) too as sqltool doesn't support command history/editing!

Typical command line for sqltool would be:

rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC} qora

${HSQLDB_JAR} contains pathname to where Maven downloaded hsqldb, typically ${HOME}/.m2/repository/org/hsqldb/hsqldb/2.4.0/hsqldb-2.4.0.jar, but for now lib/org/hsqldb/hsqldb/r5836/hsqldb-r5836.jar

${SQLTOOL_JAR} contains pathname to where Maven downloaded sqltool, typically ${HOME}/.m2/repository/org/hsqldb/sqltool/2.4.1/sqltool-2.4.1.jar

${SQLTOOL_RC} contains pathname to a text file describing Qora2 database, e.g. ${HOME}/.sqltool.rc, with contents like:

urlid qora
url jdbc:hsqldb:file:db/qora
username SA
password

urlid qora-test
url jdbc:hsqldb:file:db/test
username SA
password

You could change the line url jdbc:hsqldb:file:db/test to use a full pathname for easier use.

Another idea is to assign a shell alias in your .bashrc like:

export HSQLDB_JAR=${HOME}/.m2/repository/org/hsqldb/hsqldb/2.4.0/hsqldb-2.4.0.jar
export SQLTOOL_JAR=${HOME}/.m2/repository/org/hsqldb/sqltool/2.4.1/sqltool-2.4.1.jar
alias sqltool='rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC}'

So you can simply type: sqltool qora-test

Don't forget to use SHUTDOWN; before exiting sqltool so that database files are closed cleanly.