Wiki
Clone wikinas / How to get NAS client from NXT client (version 1.1.3)
Essential steps to get Nas from Nxt 1.1.3
"Essential" here means that they are the only required modifications for the Nas blockchain. The non-essential modifications doesn't affect the blockchain.
1. Blockchain identity and coin distribution
- src/java/nxt/Genesis.java: taken from Nas 0.8.13(N1), changing
interface
forfinal class
. This file is the essence of the coin. - html/ui/js/nrs.server.js: genesis account ID hardcoded!, changed to
NAS-*
2. Start of blockchain time, 2014-March-25 12:00:0.000
- src/java/nxt/Constants.java: EPOCH_BEGINNING
- html/nrs/myTransactions.java
- html/nrs/orphanedBlocks.java
- html/nrs/recentBlocks.java
- html/nrs/unconfirmedTransactions.java
- html/ui/js/nrs.messages.js
- html/ui/js/nrs.polls.js
- html/ui/js/nrs.util.js
- html/ui/message.html
3. Total amount of coins 10 billion NAS
- src/java/nxt/Constants.java: defined at
MAX_BALANCE_NXT
. - src/java/nxt/DbVersion.java: method
update
, cases 1, 3, 24 and 26,BIGINT
in DB fieldsblock.total_amount
andtransaction.amount
. - src/java/nxt/BlockImpl.java:
getBytes()
, two conditionsversion < 3
- src/java/nxt/TransactionImpl.java:
getBytes()
andsignatureOffset()
, two conditionsuseNQT()
in case of false
Non-essential steps in order to complete the identity of Nas Coin
Name properties, and filename
- ./* recursively: replace of
Property("nxt.
withProperty("nas.
- nxt-default.properties renamed to nas-default.properties
- src/java/nxt/Nxt.java: properties filename in strings
- nas-default.properties:
- replaced
nxt.
fornas.
- updated values (mainly timeouts) to that of Nxt recent version, 1.4.17
- replaced
Ports for Nas servers
- conf/nas-default.properties: defaults for peer (7871), UI (7872), API(7873):
- src/java/nxt/peer/Peers.java: peer default (7871) and testnet (6871)
- src/java/nxt/user/Users.java: UI testnet (6872)
- src/java/nxt/http/API.java: API testnet (6873)
- html/ui/js/nrs.js: API testnet (6873, hardcoded!)
Block heights for check points
- src/java/nxt/Constants.java:
NQT_BLOCK = 35025
and other*_BLOCK
, (taken from decompiling the.jar
file in Nas Client 1.1.3(N1)) - src/java/nxt/BlockchainProcessorImpl.java:
CHECKSUM_*
, taken from the log when running withnull
values from scratch enough time to pass that heights
Hardcoded peer nodes
- src/java/nxt/peer/DbVersion.java: as it must be hardcoded in this file, we use the 3 currently trusted
- conf/nas-default.properties: empty
wellKnownPeers
,knownBlacklistedPeers
andtestnetPeers
, as any peer should go to conf/nas.properties
Prefix NAS-
for account ID:
- src/java/nxt/util/Convert.java
- html/ui/js/assetexchange.js
- html/ui/js/contacts.js
- html/ui/js/nrs.forms.js
- html/ui/js/nrs.server.js
- html/ui/js/nrs.js
- html/ui/js/modals.account.js
- html/ui/js/recipient.js
- html/ui/js/server.js
- html/ui/js/util/nxtaddress.js
User Interface files
- html/ui/img/*.png: Nas logos
- html/ui/js/settings.js: default colors; amount/fee warnings; news
- html/ui/js/update.js: repository for updates
- html/ui/js/*.js: replaced
NXT
withNAS
in strings and comments - html/ui/index.html:
- replaced
NXT
withNAS
in strings - removed Help option
- the minimum fee to issue an asset is 100,000 Nas
- replaced
Other added or modified files
- src/java/nxt/Nxt.java:
VERSION = 1.1.3.N2
- List4GenesisBlock: added
- NXT_Wallet.url, README.txt: edited for Nas
- run.bat: edited for Nas, added lines to find Java in $PATH
- nas-client-1.1.3.N2.changelog.txt: added (this changelog file)
Updated