Migration to V5 - PascalCoin/PascalCoin GitHub Wiki
Upgrade from V4 to V5 procedure
READ CAREFULLY:
Why to upgrade to V5
- The new V5 is a Hard fork version, that means that current versions (V4) will not be able to process new blocks generated by the V5.
- There are a lot of several bugs fixed in this new V5 release, it's more secure, more stable, and improved than previous ones.
- Slated Hard fork will be at block 378000, approximately during 12-13 of December 2019
- For a detailed description of majors changes, please read the CHANGELOG file at github
This document will give you a detailed description of how to upgrade to new V4, please follow it.
Feel free to contact with our team at discord for assistance if you need help.
Prior to start
Notations:
- APPDATA folder:
- APPDATA in Windows: c:/Users/ (my user) /AppData/Roaming
- APPDATA in Linux: $HOME /home or /root (when running as a root)
- Blockchain file:
- Name: BlockChainStream.blocks
- Folder: APPDATA/PascalCoin/Data
- Safebox file:
- Name: checkpointX.safebox (Important is extension: .safebox)
- Folder: APPDATA/PascalCoin/Data
- Multiple files in folder, each file is a safebox checkpoint and contains a safebox in a specified time
- Private keys file:
- Name: WalletKeys.dat
- Folder: APPDATA/PascalCoin
Before run V5 version:
- Make a FULL BACKUP of your APPDATA/PascalCoin folder
- Data folder will contain current blockchain/safebox files
- WalletKeys.dat file will contain your private keys
Emergency rolling back procedure: (If you have executed V5, and needs to rollback to V4)
- Prior to restart old version (last stable for V4 is 4.1), delete ALL files on APPDATA/PascalCoin/Data and RESTORE BACKUP of APPDATA/PascalCoin/Data
What will happen on V5 activation
- On V5, major change will be the mining algo change. Will change from current RandomHash based algo to RandomHash2 with specifications at PIP-0036
- At block 378000 network will start accepting new operations designed for V5, such as Atomic Swap
- The signature for operations will change, but operations made in V4 version will still be valid
Upgrade to v5 procedure
JSON-RPC changes
- Updated "listaccountforsale" method to allow ATOMIC SWAPS (PIP-0032)
- Added "type" to discrimine between kind of listing. Available values are:
- "public_sale"
- "private_sale": Need to provide a valid "new_enc_pubkey" or "new_b58_pubkey"
- "atomic_account_swap": Need to provide a valid "new_enc_pubkey" or "new_b58_pubkey" and the unlocking param "enc_hash_lock"
- "atomic_coin_swap": Need to provide a valid "enc_hash_lock"
- If no "type" is defined, will automatically select between "public_sale" or "private_sale"
- Added "enc_hash_lock" (HEXASTRING) that must be exactly a 32 bytes value (stored as 64 bytes because is HexaString)
- Added "type" to discrimine between kind of listing. Available values are:
- Updated "changeaccountinfo" and "signchangeaccountinfo" calls to allow add "new_data" field for change Account.Data value (PIP-0024)
- New param "new_data" (HEXASTRING) if provided will change Account Data info. Limited from 0 to 32 bytes.
- Updated "multioperationaddoperation call to allow add "payload_type" value as described on PIP-0027
- New param "payload_type" on "senders" and "receivers" array as optional value (default 0)
- New method "senddata" as described on PIP-0033 returning an "Operation Object"
- New method "signdata" as described on PIP-0033 returning a "Raw Operations Object"
- New method "finddataoperations" as described on PIP-0033 returning an ARRAY of "Raw Operations Object"
- News params added to original PIP
- "depth" (Integer, 1000 by default) : Will search backward in blocks a maximum of "depth" blocks
- "startblock" (Integer, optional) : If defined, will start at a specified block, otherwise will start at last "sender" or "target" updated block
- News params added to original PIP
- Updated "Account Object" return values:
- "state": Can return "normal", "listed", "account_swap", "coin_swap"
- "hashed_secret" : (HEXASTRING) will contain the SHA256( SECRET ) value that must match Payload received data for Atomic Swaps (only when "state" in "account_swap" or "coin_swap")
- "amount_to_swap" : (PASCURRENCY) amount that will be transferred to counterparty account on ATOMIC COIN SWAP ("receiver_swap_account")
- "receiver_swap_account": (Integer) Counterpaty account that will receive "amount_to_swap" on ATOMIC COIN SWAP
- "data" : (HEXASTRING) will return the Account Data stored with PIP-0024
- "seal" : (HEXASTRING) will return the Account Seal stored with PIP-0029
- "updated_b_active_mode" : (Integer) Block number of last account change on active mode (private key usage for signature)
- "updated_b_passive_mode" : (Integer) Block number of last account change on passive mode (as a receiver of a transaction or similar)
- Updated "Operation Object" return values:
- "senders" : ARRAY
- "payload_type" : (Byte) as described on PIP-0027
- "data" : OBJECT will store OP_DATA information when operation is OP_DATA type as described on PIP-0016
- "id" : (String) String representation of GUID/UUID as "00000000-0000-0000-0000-000000000000" that stores 16 bytes
- "sequence" : (Integer)
- "type" : (Integer)
- "receivers" : ARRAY
- "payload_type" : (Byte) as described on PIP-0027
- "changers" : ARRAY
- "new_data" : (HEXASTRING) : If "data" is changed on "account"
- "changes" : (String) Description of changes type made
- "senders" : ARRAY
- Updated "Multi Operation Object" values:
- "changers" : ARRAY
- "new_data" : (HEXASTRING) : If "data" is changed on "account"
- "changers" : ARRAY
- Allowed to use all input params related to an account number as a String and including checksum
- Example: Call "sendto" using param "sender"="1234-44" or "target"="12345-54"
- If value is not a valid format, call will return error
MINER changes
- Communications between PascalCoin node and miner has no change, will be the same, all currently developed software based on it will continue working as expected
- PascalCoin will provide a CPU miner (PascalCoinMiner 5.0 - available at Github) that will automatically change mining algo from current to RandomHash2 on Hard fork
- We recommend to start the PascalCoin miner CPU few hours prior the hard fork and will mine with CPU automatically, starting mining new algo when detected hard fork. You don't need to do anything else.
- Pools or external miners: Added new JSON-RPC methods for Server mining support (TCP/IP, no HTTP protocol)
- New methods "rh" and "rh2" that will return a hash calculated using the RandomHash or RandomHash2 algo
- params must include a 1-length array with the digest in hexastring format
- Example:
- Call {"id":123,"method":"rh2","params":["a02f3a4b5c62102e1a9a983f"]}
- Response {"id":123,"error":null, "result": {"digest":"A02F3A4B5C62102E1A9A983F", "hash":"5D825627E1E9865C17050E55B05D7D3A0C36C11D855261A511880C3CBF015AA9", "algo":"rh2"} }
Run a TESNET
If you want, you can run a TESTNET release, that will connect to our LIVE testnet servers Last TESTNET avaialable is 5.1: https://github.com/PascalCoin/PascalCoin/releases