diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..8fe28b494 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +/*.iml +/dist +/.idea +burst.jar +burst_test_db +burst_db +nxt.log +/conf/logging.properties +/conf/nxt.properties +nxt.log.lck + diff --git a/README.md b/README.md index a13c45373..82f7980e5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,111 @@ -burstcoin -========= +# Info + +Please visit https://github.com/PoC-Consortium/burstcoin for the designated successor and current development version. + +# Burstcoin + +The world's first HDD-mined cryptocurrency using the new algorithm, Proof-of-Capacity. + +## Striking Features + +- Proof of Capacity - ASIC Proof / Energy efficient mining +- Fast sync. with multithread CPU or OpenCL/GPU (optional) +- "Turing complete" smart contracts, via Automated Transactions (AT) https://ciyam.org/at/at.html +- Decentralized Crowdfunding and Lottery via AT +- Asset Exchange and Digital Goods Store +- Advanced transactions: Escrow and Subscription +- Encrypted Messaging + +## Specification + +- NXT based +- Proof of Stake Removed +- Proof of Capacity implemented +- No IPO +- No Premine +- 4 minute block time +- 2,158,812,800 coins total +- Block reward starts at 10,000/block +- Block Reward Decreases at 5% each month + +## Version History + +- 2017/07/25 New version release Burst 1.2.9 +- 2017/02/19 New version release Burst 1.2.8 +- 2016/11/16 New version release Burst 1.2.7 +- 2016/07/27 New version release Burst 1.2.6 +- 2016/07/19 New version release Burst 1.2.5 +- 2016/06/07 New version release Burst 1.2.4 +- 2016/01/11 Community takeover +- 2015/04/20 New version release Burst 1.2.3 +- 2015/02/05 New version release Burst 1.2.2 +- 2015/01/20 New version release Burst 1.2.1 +- 2014/12/22 New version release Burst 1.2.0 +- 2014/11/04 New version release 1.1.5 +- 2014/10/18 New version release 1.1.4 +- 2014/10/04 Escrow transactions enabled +- 2014/09/27 New version release 1.1.3 +- 2014/09/14 New version release 1.1.2 +- 2014/09/13 Stuck transactions statement +- 2014/09/13 New version release 1.1.1 +- 2014/09/09 New version release 1.1.0 +- 2014/08/31 V2 mining pool now up +- 2014/08/27 New version release 1.0.3 +- 2014/08/20 First pool (v1) now up +- 2014/08/17 New version release 1.0.2 +- 2014/08/16 Statement regarding the difficulty adjustment +- 2014/08/11 Statement regarding The pool situation + +## Build + +Burstcoin can be build using maven or the compile scripts within this repository. + +## Links + +For further information, please visit the following pages. + +### Home +https://web.burst-team.us + +### Block-Explorer +http://burstcoin.biz + +### Forum +https://forums.burst-team.us + +### Bitcointalk +https://bitcointalk.org/index.php?topic=1541310 *(New unmoderated)* + +https://bitcointalk.org/index.php?topic=1323657 *(Alternative moderated)* + +https://bitcointalk.org/index.php?topic=731923 *(Original unmoderated)* + +### Related repositories +https://github.com/BurstProject *Original/Forked Burstcoin, ATDebugger, ATAssembler, POCMiner (Proof of concept plotter/miner), etc.* + +https://github.com/IceBurst/Burst *Burst for Android* + +https://github.com/dawallet/ *Burstcoin Win Client, Android App* + +https://github.com/Blagodarenko *Blago's XPlotter, Windows Miner, PlotsChecker, etc.* + +https://github.com/de-luxe *GPU assisted jMiner, Faucet Software, Observer, AddressGenerator* + +https://github.com/Creepsky/creepMiner *C++ Crossplatform Miner* + +https://github.com/BurstTools/BurstSoftware *Windows Plot Generator for SEE4/AVX2* + +https://github.com/bhamon *gpuPlotGenerator, BurstMine (graphical plotter/miner)* + +https://github.com/kartojal *GUI for Dcct Tools, GUI for gpuPlotGenerator (linux)* + +https://github.com/Kurairaito *Burst Plot Generator by Kurairaito* + +https://github.com/Mirkic7 *Improved Linux Burst Plotter / optimizer / miner (linux)* + +https://github.com/uraymeiviar *C Miner, Pool, Block Explorer, Plot Composer (linux)* + +https://github.com/mrpsion/burst-mining-system *Web interface for Plotting and Mining* + +### Additional Software +https://forums.burst-team.us/category/9/burst-software diff --git a/Readme.txt b/Readme.txt index dbfa5b5b1..73a57349d 100644 --- a/Readme.txt +++ b/Readme.txt @@ -1,7 +1,7 @@ -Burst ver 1.0.0 +Burst ver 1.2.9 Requirements: -Java 7 compatible JVM +Java 8 compatible JVM Setup: Before you do anything, sync your clock. Burst uses your computer clock's time, and having the time off too much could cause you to reject legit blocks, or miss out on blocks you could have mined. On linux "sudo ntpd -gq", on windows go to change date/time, and go to internet time and tell it to sync with a time server. diff --git a/burst.jar b/burst.jar deleted file mode 100644 index 7b6dcacd9..000000000 Binary files a/burst.jar and /dev/null differ diff --git a/burst_db/.gitignore b/burst_db/.gitignore deleted file mode 100644 index 98e6ef67f..000000000 --- a/burst_db/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/conf/.gitignore b/conf/.gitignore deleted file mode 100644 index 0567e2019..000000000 --- a/conf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.properties diff --git a/conf/nxt-default.properties b/conf/nxt-default.properties index dc03ccd7c..552b07cea 100644 --- a/conf/nxt-default.properties +++ b/conf/nxt-default.properties @@ -1,3 +1,9 @@ +############################################################ +# Do not modify this file. Instead, create a # +# nxt.properties file and make your changes there. # +# They will overwrite the defaults! # +############################################################ + #### PEER NETWORKING #### # Announce my IP address/hostname to peers and allow them to share it with other peers. @@ -24,7 +30,14 @@ nxt.myHallmark= # A list of well known peer addresses / host names, separated by '; '. # If not set, a random selection of nxtcrypto.org and nxtbase.com nodes is used. -nxt.wellKnownPeers=198.199.103.145; 178.62.39.204; burst.cryptoport.io; 192.155.252.202; 37.58.107.74; 119.81.165.138; 119.81.44.170; 119.81.44.171 +nxt.wellKnownPeers=192.99.183.10; 18.116.7.200; 84.249.20.155; 45.58.62.236; 210.54.33.230; 203.167.243.44; 210.115.228.231; 171.98.174.125; 38.114.101.88; 38.114.101.87; 158.69.53.36; 176.9.25.254; 5.104.175.156; 5.104.175.157; 37.97.40.203; 192.99.47.76; 87.167.177.45; 5.9.124.68; 1.179.201.220; 75.158.125.140; 160.36.130.180; 178.136.98.153; 5.104.175.162; 91.121.159.44; 203.59.236.69; 5.9.119.180; 70.95.197.163; 88.99.249.245; 89.179.240.131; 126.124.211.226; 92.81.73.43; 178.63.87.215; 211.218.247.79; 71.166.55.129; 5.104.175.152; 5.104.175.154; 162.236.93.205; 75.189.195.82; 5.104.175.134; 5.104.175.137; 5.104.175.138; 107.141.2.251; 137.248.121.73; 88.106.222.81; 204.45.61.2; 85.217.171.59; 184.161.232.180; 213.113.246.35; 38.114.101.90; 188.2.144.168; 137.248.122.195; 162.243.144.202; 199.189.85.178; 111.90.145.100; 218.38.28.183; 5.104.175.11; 203.158.118.10; 151.80.42.137; 103.76.180.145; 88.99.166.52; 24.160.75.65; 198.27.68.159; 62.75.187.160; 91.189.160.214; 5.104.175.131; 73.169.38.202; 78.46.37.137; 103.251.107.78; 62.224.96.21; 95.165.143.249; 5.153.225.55; 5.189.165.186; 210.115.227.99; 213.136.69.222; 81.94.202.156; 81.83.5.50; 89.106.1.126; 77.120.101.95; 93.123.73.133; 202.5.195.252; 35.187.253.145; 77.120.101.180; 216.165.179.49; 162.248.4.26; 85.10.211.130; 192.161.209.104; 185.144.131.131; 2.81.168.154; 112.167.81.44; 86.19.102.12; 211.104.175.60; 87.98.145.132; 174.36.0.110; 88.115.127.46; 128.171.53.34; 173.238.248.170; 5.104.175.110; 90.126.120.47; 5.104.175.211; 37.120.185.33; 46.4.126.236; 108.238.244.144; 5.104.175.214; 112.161.84.93; 39.117.137.191; 5.9.106.250; 176.9.43.13; 67.68.14.47; 151.80.16.34; 223.19.255.106; + +# These peers will always be sent rebroadcast transactions. They are also automatically added to wellKnownPeers, so no need for duplicates. +burst.rebroadcastPeers=a.storj.eu; 158.69.150.192 + +# Connect to this many well known peers before using the peer database to get connected faster. +# Set to 0 or comment out to disable. +burst.connectWellKnownFirst=10 # Known bad peers to be blacklisted nxt.knownBlacklistedPeers= @@ -91,6 +104,17 @@ nxt.isOffline=false # risk of revealing that this node is the submitter of such re-broadcasted new transactions. nxt.enableTransactionRebroadcasting=true +# Do not allow the number of unconfirmed transactions in memory to exceed this value. +# If exceeded, the fee/size ratio of the transactions in a forged block is used to +# decide which to keep in the unconfirmed pool. Set to 0 or negative for no limit. +nxt.maxUnconfirmedTransactions=400 + +# Transactions that aren't confirmed for this many blocks start getting rebroadcast. +burst.rebroadcastAfter=5 + +# Transactions being rebroadcast get rebroadcast every this many blocks until they are confirmed. +burst.rebroadcastEvery=4 + #### API SERVER #### # Accept http/json API requests. @@ -205,10 +229,10 @@ nxt.debugLogUnconfirmed=false # Database connection JDBC url, see the H2 documentation for possible customizations. # Append ;AUTO_SERVER=TRUE to enable automatic mixed mode access. # The nxt_db folder is expected to be in the current working directory, will be created if missing. -nxt.dbUrl=jdbc:h2:burst_db/burst;DB_CLOSE_ON_EXIT=FALSE +nxt.dbUrl=jdbc:h2:./burst_db/burst;DB_CLOSE_ON_EXIT=FALSE # Database connection JDBC url to use with the test network, if isTestnet=true -nxt.testDbUrl=jdbc:h2:burst_test_db/burst;DB_CLOSE_ON_EXIT=FALSE +nxt.testDbUrl=jdbc:h2:./burst_test_db/burst;DB_CLOSE_ON_EXIT=FALSE # Database connection timeout in seconds. nxt.dbLoginTimeout=70 @@ -261,3 +285,15 @@ nxt.maxRollback=1440 # Enable API requests used for blockchain and database manipulation. nxt.enableDebugAPI=false +# Debug option for Testnet: Winning with every Deadline +burst.mockMining = false + +# GPU Blocksync Acceleration / experimental ! +burst.oclAuto=true +burst.oclVerify=false + +# If 'burst.oclAuto=false' gpu must be specified +burst.oclPlatform=0 +burst.oclDevice=0 +burst.oclMemPercent=50 +burst.oclHashesPerEnqueue=1000 \ No newline at end of file diff --git a/genscoop.cl b/genscoop.cl new file mode 100644 index 000000000..925945c75 --- /dev/null +++ b/genscoop.cl @@ -0,0 +1,576 @@ +typedef unsigned int sph_u32; + +#define SPH_C32(x) ((sph_u32)(x ## U)) +#define SPH_T32(x) (as_uint(x)) +#define SPH_ROTL32(x, n) rotate(as_uint(x), as_uint(n)) +#define SPH_ROTR32(x, n) SPH_ROTL32(x, (32 - (n))) + +#define SPH_C64(x) ((sph_u64)(x ## UL)) +#define SPH_T64(x) (as_ulong(x)) +#define SPH_ROTL64(x, n) rotate(as_ulong(x), (n) & 0xFFFFFFFFFFFFFFFFUL) +#define SPH_ROTR64(x, n) SPH_ROTL64(x, (64 - (n))) + +/* $Id: shabal.c 175 2010-05-07 16:03:20Z tp $ */ +/* + * Shabal implementation. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * 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. + * + * ===========================(LICENSE END)============================= + * + * @author Thomas Pornin + */ + +/* + * Part of this code was automatically generated (the part between + * the "BEGIN" and "END" markers). + */ + +#define sM 16 + +#define C32 SPH_C32 +#define T32 SPH_T32 + +#define O1 13 +#define O2 9 +#define O3 6 + +/* + * We copy the state into local variables, so that the compiler knows + * that it can optimize them at will. + */ + +/* BEGIN -- automatically generated code. */ + +#define INPUT_BLOCK_ADD do { \ + B0 = T32(B0 + M0); \ + B1 = T32(B1 + M1); \ + B2 = T32(B2 + M2); \ + B3 = T32(B3 + M3); \ + B4 = T32(B4 + M4); \ + B5 = T32(B5 + M5); \ + B6 = T32(B6 + M6); \ + B7 = T32(B7 + M7); \ + B8 = T32(B8 + M8); \ + B9 = T32(B9 + M9); \ + BA = T32(BA + MA); \ + BB = T32(BB + MB); \ + BC = T32(BC + MC); \ + BD = T32(BD + MD); \ + BE = T32(BE + ME); \ + BF = T32(BF + MF); \ + } while (0) + +#define INPUT_BLOCK_SUB do { \ + C0 = T32(C0 - M0); \ + C1 = T32(C1 - M1); \ + C2 = T32(C2 - M2); \ + C3 = T32(C3 - M3); \ + C4 = T32(C4 - M4); \ + C5 = T32(C5 - M5); \ + C6 = T32(C6 - M6); \ + C7 = T32(C7 - M7); \ + C8 = T32(C8 - M8); \ + C9 = T32(C9 - M9); \ + CA = T32(CA - MA); \ + CB = T32(CB - MB); \ + CC = T32(CC - MC); \ + CD = T32(CD - MD); \ + CE = T32(CE - ME); \ + CF = T32(CF - MF); \ + } while (0) + +#define XOR_W do { \ + A00 ^= Wlow; \ + A01 ^= Whigh; \ + } while (0) + +#define SWAP(v1, v2) do { \ + sph_u32 tmp = (v1); \ + (v1) = (v2); \ + (v2) = tmp; \ + } while (0) + +#define SWAP_BC do { \ + SWAP(B0, C0); \ + SWAP(B1, C1); \ + SWAP(B2, C2); \ + SWAP(B3, C3); \ + SWAP(B4, C4); \ + SWAP(B5, C5); \ + SWAP(B6, C6); \ + SWAP(B7, C7); \ + SWAP(B8, C8); \ + SWAP(B9, C9); \ + SWAP(BA, CA); \ + SWAP(BB, CB); \ + SWAP(BC, CC); \ + SWAP(BD, CD); \ + SWAP(BE, CE); \ + SWAP(BF, CF); \ + } while (0) + +#define PERM_ELT(xa0, xa1, xb0, xb1, xb2, xb3, xc, xm) do { \ + xa0 = T32((xa0 \ + ^ (((xa1 << 15) | (xa1 >> 17)) * 5U) \ + ^ xc) * 3U) \ + ^ xb1 ^ (xb2 & ~xb3) ^ xm; \ + xb0 = T32(~(((xb0 << 1) | (xb0 >> 31)) ^ xa0)); \ + } while (0) + +#define PERM_STEP_0 do { \ + PERM_ELT(A00, A0B, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A01, A00, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A02, A01, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A03, A02, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A04, A03, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A05, A04, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A06, A05, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A07, A06, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A08, A07, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A09, A08, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A0A, A09, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A0B, A0A, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A00, A0B, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A01, A00, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A02, A01, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A03, A02, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define PERM_STEP_1 do { \ + PERM_ELT(A04, A03, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A05, A04, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A06, A05, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A07, A06, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A08, A07, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A09, A08, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A0A, A09, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A0B, A0A, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A00, A0B, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A01, A00, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A02, A01, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A03, A02, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A04, A03, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A05, A04, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A06, A05, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A07, A06, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define PERM_STEP_2 do { \ + PERM_ELT(A08, A07, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A09, A08, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A0A, A09, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A0B, A0A, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A00, A0B, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A01, A00, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A02, A01, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A03, A02, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A04, A03, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A05, A04, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A06, A05, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A07, A06, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A08, A07, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A09, A08, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A0A, A09, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A0B, A0A, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define APPLY_P do { \ + B0 = T32(B0 << 17) | (B0 >> 15); \ + B1 = T32(B1 << 17) | (B1 >> 15); \ + B2 = T32(B2 << 17) | (B2 >> 15); \ + B3 = T32(B3 << 17) | (B3 >> 15); \ + B4 = T32(B4 << 17) | (B4 >> 15); \ + B5 = T32(B5 << 17) | (B5 >> 15); \ + B6 = T32(B6 << 17) | (B6 >> 15); \ + B7 = T32(B7 << 17) | (B7 >> 15); \ + B8 = T32(B8 << 17) | (B8 >> 15); \ + B9 = T32(B9 << 17) | (B9 >> 15); \ + BA = T32(BA << 17) | (BA >> 15); \ + BB = T32(BB << 17) | (BB >> 15); \ + BC = T32(BC << 17) | (BC >> 15); \ + BD = T32(BD << 17) | (BD >> 15); \ + BE = T32(BE << 17) | (BE >> 15); \ + BF = T32(BF << 17) | (BF >> 15); \ + PERM_STEP_0; \ + PERM_STEP_1; \ + PERM_STEP_2; \ + A0B = T32(A0B + C6); \ + A0A = T32(A0A + C5); \ + A09 = T32(A09 + C4); \ + A08 = T32(A08 + C3); \ + A07 = T32(A07 + C2); \ + A06 = T32(A06 + C1); \ + A05 = T32(A05 + C0); \ + A04 = T32(A04 + CF); \ + A03 = T32(A03 + CE); \ + A02 = T32(A02 + CD); \ + A01 = T32(A01 + CC); \ + A00 = T32(A00 + CB); \ + A0B = T32(A0B + CA); \ + A0A = T32(A0A + C9); \ + A09 = T32(A09 + C8); \ + A08 = T32(A08 + C7); \ + A07 = T32(A07 + C6); \ + A06 = T32(A06 + C5); \ + A05 = T32(A05 + C4); \ + A04 = T32(A04 + C3); \ + A03 = T32(A03 + C2); \ + A02 = T32(A02 + C1); \ + A01 = T32(A01 + C0); \ + A00 = T32(A00 + CF); \ + A0B = T32(A0B + CE); \ + A0A = T32(A0A + CD); \ + A09 = T32(A09 + CC); \ + A08 = T32(A08 + CB); \ + A07 = T32(A07 + CA); \ + A06 = T32(A06 + C9); \ + A05 = T32(A05 + C8); \ + A04 = T32(A04 + C7); \ + A03 = T32(A03 + C6); \ + A02 = T32(A02 + C5); \ + A01 = T32(A01 + C4); \ + A00 = T32(A00 + C3); \ + } while (0) + +#define INCR_W do { \ + if ((Wlow = T32(Wlow + 1)) == 0) \ + Whigh = T32(Whigh + 1); \ + } while (0) + +__constant static const sph_u32 A_init_192[] = { + C32(0xFD749ED4), C32(0xB798E530), C32(0x33904B6F), C32(0x46BDA85E), + C32(0x076934B4), C32(0x454B4058), C32(0x77F74527), C32(0xFB4CF465), + C32(0x62931DA9), C32(0xE778C8DB), C32(0x22B3998E), C32(0xAC15CFB9) +}; + +__constant static const sph_u32 B_init_192[] = { + C32(0x58BCBAC4), C32(0xEC47A08E), C32(0xAEE933B2), C32(0xDFCBC824), + C32(0xA7944804), C32(0xBF65BDB0), C32(0x5A9D4502), C32(0x59979AF7), + C32(0xC5CEA54E), C32(0x4B6B8150), C32(0x16E71909), C32(0x7D632319), + C32(0x930573A0), C32(0xF34C63D1), C32(0xCAF914B4), C32(0xFDD6612C) +}; + +__constant static const sph_u32 C_init_192[] = { + C32(0x61550878), C32(0x89EF2B75), C32(0xA1660C46), C32(0x7EF3855B), + C32(0x7297B58C), C32(0x1BC67793), C32(0x7FB1C723), C32(0xB66FC640), + C32(0x1A48B71C), C32(0xF0976D17), C32(0x088CE80A), C32(0xA454EDF3), + C32(0x1C096BF4), C32(0xAC76224B), C32(0x5215781C), C32(0xCD5D2669) +}; + +__constant static const sph_u32 A_init_224[] = { + C32(0xA5201467), C32(0xA9B8D94A), C32(0xD4CED997), C32(0x68379D7B), + C32(0xA7FC73BA), C32(0xF1A2546B), C32(0x606782BF), C32(0xE0BCFD0F), + C32(0x2F25374E), C32(0x069A149F), C32(0x5E2DFF25), C32(0xFAECF061) +}; + +__constant static const sph_u32 B_init_224[] = { + C32(0xEC9905D8), C32(0xF21850CF), C32(0xC0A746C8), C32(0x21DAD498), + C32(0x35156EEB), C32(0x088C97F2), C32(0x26303E40), C32(0x8A2D4FB5), + C32(0xFEEE44B6), C32(0x8A1E9573), C32(0x7B81111A), C32(0xCBC139F0), + C32(0xA3513861), C32(0x1D2C362E), C32(0x918C580E), C32(0xB58E1B9C) +}; + +__constant static const sph_u32 C_init_224[] = { + C32(0xE4B573A1), C32(0x4C1A0880), C32(0x1E907C51), C32(0x04807EFD), + C32(0x3AD8CDE5), C32(0x16B21302), C32(0x02512C53), C32(0x2204CB18), + C32(0x99405F2D), C32(0xE5B648A1), C32(0x70AB1D43), C32(0xA10C25C2), + C32(0x16F1AC05), C32(0x38BBEB56), C32(0x9B01DC60), C32(0xB1096D83) +}; + +__constant static const sph_u32 A_init_256[] = { + C32(0x52F84552), C32(0xE54B7999), C32(0x2D8EE3EC), C32(0xB9645191), + C32(0xE0078B86), C32(0xBB7C44C9), C32(0xD2B5C1CA), C32(0xB0D2EB8C), + C32(0x14CE5A45), C32(0x22AF50DC), C32(0xEFFDBC6B), C32(0xEB21B74A) +}; + +__constant static const sph_u32 B_init_256[] = { + C32(0xB555C6EE), C32(0x3E710596), C32(0xA72A652F), C32(0x9301515F), + C32(0xDA28C1FA), C32(0x696FD868), C32(0x9CB6BF72), C32(0x0AFE4002), + C32(0xA6E03615), C32(0x5138C1D4), C32(0xBE216306), C32(0xB38B8890), + C32(0x3EA8B96B), C32(0x3299ACE4), C32(0x30924DD4), C32(0x55CB34A5) +}; + +__constant static const sph_u32 C_init_256[] = { + C32(0xB405F031), C32(0xC4233EBA), C32(0xB3733979), C32(0xC0DD9D55), + C32(0xC51C28AE), C32(0xA327B8E1), C32(0x56C56167), C32(0xED614433), + C32(0x88B59D60), C32(0x60E2CEBA), C32(0x758B4B8B), C32(0x83E82A7F), + C32(0xBC968828), C32(0xE6E00BF7), C32(0xBA839E55), C32(0x9B491C60) +}; + +__constant static const sph_u32 A_init_384[] = { + C32(0xC8FCA331), C32(0xE55C504E), C32(0x003EBF26), C32(0xBB6B8D83), + C32(0x7B0448C1), C32(0x41B82789), C32(0x0A7C9601), C32(0x8D659CFF), + C32(0xB6E2673E), C32(0xCA54C77B), C32(0x1460FD7E), C32(0x3FCB8F2D) +}; + +__constant static const sph_u32 B_init_384[] = { + C32(0x527291FC), C32(0x2A16455F), C32(0x78E627E5), C32(0x944F169F), + C32(0x1CA6F016), C32(0xA854EA25), C32(0x8DB98ABE), C32(0xF2C62641), + C32(0x30117DCB), C32(0xCF5C4309), C32(0x93711A25), C32(0xF9F671B8), + C32(0xB01D2116), C32(0x333F4B89), C32(0xB285D165), C32(0x86829B36) +}; + +__constant static const sph_u32 C_init_384[] = { + C32(0xF764B11A), C32(0x76172146), C32(0xCEF6934D), C32(0xC6D28399), + C32(0xFE095F61), C32(0x5E6018B4), C32(0x5048ECF5), C32(0x51353261), + C32(0x6E6E36DC), C32(0x63130DAD), C32(0xA9C69BD6), C32(0x1E90EA0C), + C32(0x7C35073B), C32(0x28D95E6D), C32(0xAA340E0D), C32(0xCB3DEE70) +}; + +__constant static const sph_u32 A_init_512[] = { + C32(0x20728DFD), C32(0x46C0BD53), C32(0xE782B699), C32(0x55304632), + C32(0x71B4EF90), C32(0x0EA9E82C), C32(0xDBB930F1), C32(0xFAD06B8B), + C32(0xBE0CAE40), C32(0x8BD14410), C32(0x76D2ADAC), C32(0x28ACAB7F) +}; + +__constant static const sph_u32 B_init_512[] = { + C32(0xC1099CB7), C32(0x07B385F3), C32(0xE7442C26), C32(0xCC8AD640), + C32(0xEB6F56C7), C32(0x1EA81AA9), C32(0x73B9D314), C32(0x1DE85D08), + C32(0x48910A5A), C32(0x893B22DB), C32(0xC5A0DF44), C32(0xBBC4324E), + C32(0x72D2F240), C32(0x75941D99), C32(0x6D8BDE82), C32(0xA1A7502B) +}; + +__constant static const sph_u32 C_init_512[] = { + C32(0xD9BF68D1), C32(0x58BAD750), C32(0x56028CB2), C32(0x8134F359), + C32(0xB5D469D8), C32(0x941A8CC2), C32(0x418B2A6E), C32(0x04052780), + C32(0x7F07D787), C32(0x5194358F), C32(0x3C60D665), C32(0xBE97D79A), + C32(0x950C3434), C32(0xAED9A06D), C32(0x2537DC8D), C32(0x7CDB5969) +}; + +/* END -- automatically generated code. */ + + +/* END -- automatically generated code. */ + +#define HASH_SIZE 32 +#define HASHES_PER_SCOOP 2 +#define SCOOP_SIZE (HASHES_PER_SCOOP * HASH_SIZE) +#define SCOOPS_PER_PLOT 4096 +#define PLOT_SIZE (SCOOPS_PER_PLOT * SCOOP_SIZE) +#define HASH_CAP 4096 +#define GEN_SIZE (PLOT_SIZE + 16) + +__kernel void generate_scoops(__global unsigned long* ids, __global unsigned long* nonces, __global unsigned char* buffer, int start, int num_do, int num) { + int gid = get_global_id(0); + + if(gid < num) { + if(start == 0) { + ((__global unsigned long*)(buffer + (gid * GEN_SIZE)))[PLOT_SIZE / 8] = ids[gid]; + ((__global unsigned long*)(buffer + (gid * GEN_SIZE)))[(PLOT_SIZE / 8) + 1] = nonces[gid]; + } + + __global unsigned char* bptr = buffer + ((8191 - start) * HASH_SIZE) + (gid * GEN_SIZE); + __global unsigned char* end_bptr = bptr - (num_do * HASH_SIZE); + + int input_size = (start * HASH_SIZE) + 16; + if(input_size > HASH_CAP) { + input_size = HASH_CAP; + } + + for(; bptr > end_bptr; bptr -= HASH_SIZE) { + __global unsigned char* bptr_cur = bptr + 32; + __global unsigned char* bptr_cap = bptr_cur + input_size; + + sph_u32 A00 = A_init_256[0], A01 = A_init_256[1], A02 = A_init_256[2], A03 = A_init_256[3], A04 = A_init_256[4], A05 = A_init_256[5], A06 = A_init_256[6], A07 = A_init_256[7], + A08 = A_init_256[8], A09 = A_init_256[9], A0A = A_init_256[10], A0B = A_init_256[11]; + sph_u32 B0 = B_init_256[0], B1 = B_init_256[1], B2 = B_init_256[2], B3 = B_init_256[3], B4 = B_init_256[4], B5 = B_init_256[5], B6 = B_init_256[6], B7 = B_init_256[7], + B8 = B_init_256[8], B9 = B_init_256[9], BA = B_init_256[10], BB = B_init_256[11], BC = B_init_256[12], BD = B_init_256[13], BE = B_init_256[14], BF = B_init_256[15]; + sph_u32 C0 = C_init_256[0], C1 = C_init_256[1], C2 = C_init_256[2], C3 = C_init_256[3], C4 = C_init_256[4], C5 = C_init_256[5], C6 = C_init_256[6], C7 = C_init_256[7], + C8 = C_init_256[8], C9 = C_init_256[9], CA = C_init_256[10], CB = C_init_256[11], CC = C_init_256[12], CD = C_init_256[13], CE = C_init_256[14], CF = C_init_256[15]; + sph_u32 M0, M1, M2, M3, M4, M5, M6, M7, M8, M9, MA, MB, MC, MD, ME, MF; + sph_u32 Wlow = 1, Whigh = 0; + + while(bptr_cur <= bptr_cap) { + + if(bptr_cap == bptr_cur) { + M0 = 0x80; + M1 = M2 = M3 = M4 = M5 = M6 = M7 = M8 = M9 = MA = MB = MC = MD = ME = MF = 0; + } + else if(bptr_cap - bptr_cur == 16) { + M0 = ((__global unsigned int*)bptr_cur)[0]; + M1 = ((__global unsigned int*)bptr_cur)[1]; + M2 = ((__global unsigned int*)bptr_cur)[2]; + M3 = ((__global unsigned int*)bptr_cur)[3]; + M4 = 0x80; + M5 = M6 = M7 = M8 = M9 = MA = MB = MC = MD = ME = MF = 0; + } else if(bptr_cap - bptr_cur == 48) { + M0 = ((__global unsigned int*)bptr_cur)[0]; + M1 = ((__global unsigned int*)bptr_cur)[1]; + M2 = ((__global unsigned int*)bptr_cur)[2]; + M3 = ((__global unsigned int*)bptr_cur)[3]; + M4 = ((__global unsigned int*)bptr_cur)[4]; + M5 = ((__global unsigned int*)bptr_cur)[5]; + M6 = ((__global unsigned int*)bptr_cur)[6]; + M7 = ((__global unsigned int*)bptr_cur)[7]; + M8 = ((__global unsigned int*)bptr_cur)[8]; + M9 = ((__global unsigned int*)bptr_cur)[9]; + MA = ((__global unsigned int*)bptr_cur)[10]; + MB = ((__global unsigned int*)bptr_cur)[11]; + MC = 0x80; + MD = ME = MF = 0; + } + else { + M0 = ((__global unsigned int*)bptr_cur)[0]; + M1 = ((__global unsigned int*)bptr_cur)[1]; + M2 = ((__global unsigned int*)bptr_cur)[2]; + M3 = ((__global unsigned int*)bptr_cur)[3]; + M4 = ((__global unsigned int*)bptr_cur)[4]; + M5 = ((__global unsigned int*)bptr_cur)[5]; + M6 = ((__global unsigned int*)bptr_cur)[6]; + M7 = ((__global unsigned int*)bptr_cur)[7]; + M8 = ((__global unsigned int*)bptr_cur)[8]; + M9 = ((__global unsigned int*)bptr_cur)[9]; + MA = ((__global unsigned int*)bptr_cur)[10]; + MB = ((__global unsigned int*)bptr_cur)[11]; + MC = ((__global unsigned int*)bptr_cur)[12]; + MD = ((__global unsigned int*)bptr_cur)[13]; + ME = ((__global unsigned int*)bptr_cur)[14]; + MF = ((__global unsigned int*)bptr_cur)[15]; + + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + INPUT_BLOCK_SUB; + SWAP_BC; + INCR_W; + } + + bptr_cur += 64; + } + + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + for (unsigned i = 0; i < 3; i ++) { + SWAP_BC; + XOR_W; + APPLY_P; + } + + ((__global unsigned int*)bptr)[0] = B8; + ((__global unsigned int*)bptr)[1] = B9; + ((__global unsigned int*)bptr)[2] = BA; + ((__global unsigned int*)bptr)[3] = BB; + ((__global unsigned int*)bptr)[4] = BC; + ((__global unsigned int*)bptr)[5] = BD; + ((__global unsigned int*)bptr)[6] = BE; + ((__global unsigned int*)bptr)[7] = BF; + + + input_size += HASH_SIZE; + if(input_size > HASH_CAP) { + input_size = HASH_CAP; + } + } + } +} + +__kernel void get_scoops(__global int* scoop_nums, __global unsigned char* buffer, __global unsigned char* scoops_out, int num) { + int gid = get_global_id(0); + + if(gid < num) { + __global unsigned char* bptr = buffer + (gid * GEN_SIZE); + __global unsigned char* bptr_cur = bptr; + + sph_u32 A00 = A_init_256[0], A01 = A_init_256[1], A02 = A_init_256[2], A03 = A_init_256[3], A04 = A_init_256[4], A05 = A_init_256[5], A06 = A_init_256[6], A07 = A_init_256[7], + A08 = A_init_256[8], A09 = A_init_256[9], A0A = A_init_256[10], A0B = A_init_256[11]; + sph_u32 B0 = B_init_256[0], B1 = B_init_256[1], B2 = B_init_256[2], B3 = B_init_256[3], B4 = B_init_256[4], B5 = B_init_256[5], B6 = B_init_256[6], B7 = B_init_256[7], + B8 = B_init_256[8], B9 = B_init_256[9], BA = B_init_256[10], BB = B_init_256[11], BC = B_init_256[12], BD = B_init_256[13], BE = B_init_256[14], BF = B_init_256[15]; + sph_u32 C0 = C_init_256[0], C1 = C_init_256[1], C2 = C_init_256[2], C3 = C_init_256[3], C4 = C_init_256[4], C5 = C_init_256[5], C6 = C_init_256[6], C7 = C_init_256[7], + C8 = C_init_256[8], C9 = C_init_256[9], CA = C_init_256[10], CB = C_init_256[11], CC = C_init_256[12], CD = C_init_256[13], CE = C_init_256[14], CF = C_init_256[15]; + sph_u32 M0, M1, M2, M3, M4, M5, M6, M7, M8, M9, MA, MB, MC, MD, ME, MF; + sph_u32 Wlow = 1, Whigh = 0; + + int amount = 0; + while(amount < PLOT_SIZE) { + M0 = ((__global unsigned int*)bptr_cur)[0]; + M1 = ((__global unsigned int*)bptr_cur)[1]; + M2 = ((__global unsigned int*)bptr_cur)[2]; + M3 = ((__global unsigned int*)bptr_cur)[3]; + M4 = ((__global unsigned int*)bptr_cur)[4]; + M5 = ((__global unsigned int*)bptr_cur)[5]; + M6 = ((__global unsigned int*)bptr_cur)[6]; + M7 = ((__global unsigned int*)bptr_cur)[7]; + M8 = ((__global unsigned int*)bptr_cur)[8]; + M9 = ((__global unsigned int*)bptr_cur)[9]; + MA = ((__global unsigned int*)bptr_cur)[10]; + MB = ((__global unsigned int*)bptr_cur)[11]; + MC = ((__global unsigned int*)bptr_cur)[12]; + MD = ((__global unsigned int*)bptr_cur)[13]; + ME = ((__global unsigned int*)bptr_cur)[14]; + MF = ((__global unsigned int*)bptr_cur)[15]; + + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + INPUT_BLOCK_SUB; + SWAP_BC; + INCR_W; + + bptr_cur += 64; + amount += 64; + } + + M0 = ((__global unsigned int*)bptr_cur)[0]; + M1 = ((__global unsigned int*)bptr_cur)[1]; + M2 = ((__global unsigned int*)bptr_cur)[2]; + M3 = ((__global unsigned int*)bptr_cur)[3]; + M4 = 0x80; + M5 = M6 = M7 = M8 = M9 = MA = MB = MC = MD = ME = MF = 0; + + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + for (unsigned i = 0; i < 3; i ++) { + SWAP_BC; + XOR_W; + APPLY_P; + } + + bptr += (scoop_nums[gid] * 64); + + __global unsigned char* optr = scoops_out + (gid * 64); + ((__global unsigned int*)optr)[0] = B8; + ((__global unsigned int*)optr)[1] = B9; + ((__global unsigned int*)optr)[2] = BA; + ((__global unsigned int*)optr)[3] = BB; + ((__global unsigned int*)optr)[4] = BC; + ((__global unsigned int*)optr)[5] = BD; + ((__global unsigned int*)optr)[6] = BE; + ((__global unsigned int*)optr)[7] = BF; + ((__global unsigned int*)optr)[8] = B8; + ((__global unsigned int*)optr)[9] = B9; + ((__global unsigned int*)optr)[10] = BA; + ((__global unsigned int*)optr)[11] = BB; + ((__global unsigned int*)optr)[12] = BC; + ((__global unsigned int*)optr)[13] = BD; + ((__global unsigned int*)optr)[14] = BE; + ((__global unsigned int*)optr)[15] = BF; + + for(int i = 0; i < 64; i++) { + optr[i] ^= bptr[i]; + } + } +} diff --git a/html/ui/css/app.css b/html/ui/css/app.css index 164d586d5..67227e6af 100755 --- a/html/ui/css/app.css +++ b/html/ui/css/app.css @@ -429,7 +429,7 @@ body > .header .logo { height: 50px; display: block; font-weight:bold; - padding-top: 20px; + padding-top: 0px; } body > .header .logo .icon { margin-right: 10px; @@ -578,7 +578,7 @@ body > .header .logo .icon { } .user-panel { padding: 10px; - padding-top:25%; + padding-top:10%; } .user-panel:before, .user-panel:after { @@ -876,7 +876,7 @@ body > .header .logo .icon { font-size: 14px; padding: 0; margin: 0 0 10px 0; - color: #666666; + color: #ffffff; } .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > .progress { padding: 0; @@ -1772,7 +1772,7 @@ body > .header .logo .icon { .btn.btn-default.btn-flat { border-bottom-color: #d9dadc; } -.btn.btn-primary { +/*.btn.btn-primary { background-color: rgba(215, 215, 215, 1); border-color: rgba(215, 215, 215, 1); } @@ -1781,6 +1781,8 @@ body > .header .logo .icon { .btn.btn-primary.hover { background-color: #b3b3b3; } + +*/ .btn.btn-success { background-color: #00a65a; border-color: #008d4c; @@ -1867,7 +1869,7 @@ body > .header .logo .icon { position: relative; padding: 15px 5px; margin: 0 0 10px 10px; - min-width: 80px; + min-width: 120px; height: 60px; -webkit-box-shadow: none; -moz-box-shadow: none; @@ -2149,7 +2151,7 @@ body > .header .logo .icon { -moz-border-radius: 4px; border-radius: 4px; margin: 10px auto; - width: 400px; + width: 300px; } .lockscreen-item:before, .lockscreen-item:after { @@ -2345,7 +2347,7 @@ body > .header .logo .icon { .sidebar-form input[type="text"]:focus, .sidebar-form input[type="text"]:focus + .input-group-btn .btn { background-color: #575d63; - color: #666; + color: #fff; } .sidebar-form input[type="text"]:focus + .input-group-btn .btn { border-left-color: #575d63; diff --git a/html/ui/css/main.css b/html/ui/css/main.css index 9171aca6f..526e98a5a 100755 --- a/html/ui/css/main.css +++ b/html/ui/css/main.css @@ -746,7 +746,7 @@ body > .header { -moz-border-radius: 4px; border-radius: 4px; margin: 10px auto; - width: 400px; + width: 350px; } .lockscreen-item:before, .lockscreen-item:after { @@ -804,11 +804,12 @@ body > .header { @media screen and (min-width: 768px) { .modal-dialog-wide { width: 700px; - margin: 30px auto; + margin: 70px auto; } } .bootstrap-growl-top-right { + -webkit-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5); -moz-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5); box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5); diff --git a/html/ui/css/tab-style.css b/html/ui/css/tab-style.css new file mode 100644 index 000000000..4a2fb94a4 --- /dev/null +++ b/html/ui/css/tab-style.css @@ -0,0 +1,192 @@ +.animate-change { +background-color:green; +} +#at td { +background-color:#E5E6EB; +} +.footer { +position:absolute; +bottom:0; +width:100%; +height:60px; +background-color:#f5f5f5; +} +#wrapper { +padding-left:0; +-webkit-transition:all 0.5s ease; +-moz-transition:all 0.5s ease; +-o-transition:all 0.5s ease; +} + +#wrapper.toggled { +padding-left:200px; +} + +#sidebar-wrapper { +z-index:1000; +position:fixed; +left:200px; +width:0; +height:100%; +margin-left:-200px; +overflow-y:auto; +background:#282C2F; +-webkit-transition:all 0.5s ease; +-moz-transition:all 0.5s ease; +-o-transition:all 0.5s ease; +transition:all 0.5s ease; +} + +#wrapper.toggled #sidebar-wrapper { +width:200px; +} + +#page-content-wrapper { +width:100%; +position:absolute; +padding:15px; +} + +#wrapper.toggled #page-content-wrapper { +position:absolute; +margin-right:-200px; +} +/* Sidebar Styles */ +.sidebar-nav { +position:absolute; +top:0; +width:200px; +margin:0; +padding:0; +list-style:none; +} + +.sidebar-nav li { +text-indent:20px; +line-height:40px; +} + +.sidebar-nav li a { +display:block; +text-decoration:none; +color:#999999; +} +.crowd{margin-bottom: 10px;} + +.sidebar-nav li a:hover { +text-decoration:none; +color:#fff; +background:#69C784; +} + +.sidebar-nav li a:active,.sidebar-nav li a:focus { +text-decoration:none; +} + +.sidebar-nav >.sidebar-brand { +height:65px; +font-size:18px; +line-height:60px; +} + +.sidebar-nav >.sidebar-brand a { +color:#999999; +} + +.sidebar-nav >.sidebar-brand a:hover { +color:#fff; +background:none; +} + +#powered-by { +bottom:0; +} + +@media(min-width:768px) { +#wrapper { +padding-left:200px; +} + +#wrapper.toggled { +padding-left:0; +} + +#sidebar-wrapper { +width:200px; +} + +#wrapper.toggled #sidebar-wrapper { +width:0; +} + +#page-content-wrapper { +padding:20px; +position:relative; +} + +#wrapper.toggled #page-content-wrapper { +position:relative; +margin-right:0; +} +} + +#page-content-wrapper .crowd { +margin-top:20px; +} + +.progress { +position:relative; +height:40px; +} + +.progress { +margin-bottom:10px; +} + +.progress-value { +position:absolute; +right:0; +left:0; +color:white; +font-size:1em; +line-height:40px; +} +.crowdbox { +padding:10px 5%; +background-color: #fff !important; +border:1px solid lightgray; +max-height:530px; +min-height:530px; +} + +.crowdtext { +font-size:1.2em; +max-height:240px; +min-height:240px; +overflow:auto; +} + +.text-amount { +} + +.crowdbox h2,hr { +margin-top:10px; +margin-bottom:10px; +font-size: 20px; +} + +.text-amount { +} + +.ends-in { +height:40px; +line-height:40px; +} + +.crowdbox .btn { +padding: 7px; +} + +.open-buyTicket { +font-size:1.2em; +} \ No newline at end of file diff --git a/html/ui/index.html b/html/ui/index.html index 636a03207..3c2f549d7 100755 --- a/html/ui/index.html +++ b/html/ui/index.html @@ -1,265 +1,500 @@ - + BURST Wallet - - + + + + + + + + + +
- - + - + --> - + + + - +
-
+
-
- - - - - - - -