Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,4 @@ doc/Doxyfile
src/ohmcoin-cli
src/ohmcoin-tx
src/ohmcoind
doc/Doxyfile
74 changes: 49 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,65 @@
Ohmcoin Core integration/staging repository
OHMCoin Core integration/staging repository
=====================================

[![Build Status](https://travis-ci.org/theohmproject/Ohmcoin.svg?branch=master)](https://travis-ci.org/theohmproject/Ohmcoin)
[![GitHub version](https://badge.fury.io/gh/theohmproject%2Fohmcoin.svg)](https://badge.fury.io/gh/theohmproject%2Fohmcoin)

Ohmcoin is a cutting edge cryptocurrency, with many features not available in most other cryptocurrencies.
- Anonymized transactions using zerocoin technology
- 100% Proof of Stake 3.0 Consensus protocol, allowing very low transaction fees and energy expenditure, and staking rewards to all participants in the network
- Karmanode technology used to secure the network and provide the above features, each Karmanode is secured
with collateral of 10K OHMC
- Decentralized blockchain voting utilizing Karmanode technology to form a DAO. The blockchain will distribute monthly treasury funds based on successful proposals submitted by the community and voted on by the DAO.
- Anonymized transactions using coin mixing technology, we call it _Coin Mixing_.
- Fast transactions featuring guaranteed zero confirmation transactions, we call it _FastSend_.
- Decentralized blockchain voting providing for consensus based advancement of the current Karmanode
technology used to secure the network and provide the above features, each Karmanode is secured
with collateral of 3000 OHMC

17.6M ohmcoin was produced for swapping. 500k were mined 1-200 blocks to bring that amount to 18.1M OHMC, the amount needed for the swap.
More information at [ohmcoin.org](http://www.ohmcoin.org)

Since then, the Ohmcoin repository has been rebaselined to show the fork relationship properly.

## BCT Thread ##
### Coin Specs
<table>
<tr><td>Ticker Symbol</td><td>OHMC</td></tr>
<tr><td>Algorithm</td><td>Quark</td></tr>
<tr><td>Type</td><td>PoW - PoS Hybrid*</td></tr>
<tr><td>Block Time</td><td>30 Seconds</td></tr>
<tr><td>Difficulty Retargeting</td><td>Every Block</td></tr>
<tr><td>Premine/Initial Supply</td><td>30Mil OHMC*</td></tr>
<tr><td>OHMC Created Per block</td><td>1 OHMC*</td></tr>
</table>

https://bitcointalk.org/index.php?topic=2307909.0
*First 1000 Blocks PoW. 1001 - Infinite Blocks PoS only.

Rebrand from KryptKoin [KTK] to Ohmcoin [OHMC]
**30Mil OHMC initial coins Premined to Swap over prior OHMC Block Chain.

## Coin Specs ##
### PoS/PoW Block Details
<table>
<tr><td>Algo</td><td>Quark</td></tr>
<tr><td>Block Time</td><td>60 Seconds</td></tr>
<tr><td>Difficulty Retargeting</td><td>Every Block</td></tr>
<tr><td>Max Coin Supply (PoS Phase)</td><td>Infinite</td></tr>
<tr><td>Proof Of Work Phase</td><td>1-1000 Blocks.</td></tr>
<tr><td>Proof of Stake Phase</td><td>1001-100 Million</td></tr>
</table>

## PoS Rewards Breakdown ##
### Reward Methods
<table>
<tr><td>Karmanodes</td><td>Yes - 3000 OHMC Required</td></tr>
<tr><td>Wallet Staking</td><td>Yes - 1 to infinite OHMC</td></tr>
</table>

### Staking Reward Details
<table>
<th>Block Height</th><th>Reward</th><th>Karmanodes</th><th>Stakers</th>
<tr><td><= 755,600</td><td>7.7 OHMC</td><td>4.2 OHMC</td><td>2.8 OHMC</td></tr>
<tr><td>755,601-1,043,999</td><td>5 OHMC</td><td>2.7 OHMC</td><td>1.8 OHMC</td></tr>
<tr><td>1,044,000-1,562,398</td><td>4 OHMC</td><td>2.16 OHMC</td><td>1.44 OHMC</td></tr>
<tr><td>> 1,562,399</td><td>3 OHMC</td><td>1.62 OHMC</td><td>1.08 OHMC</td></tr>
<tr><td>OHMC Produced</td><td>1 OHMC Per Block</td></tr>
<tr><td>Amount Designated for Rewards</td><td>100% of OHMC produced goes to Staking Rewards</td></tr>
<tr><td>Rewards Algorithm</td><td>SeeSaw Based Targeting System</td></tr>
<tr><td>Amount of Rewards Per Block</td><td>2 Rewards, 1 for Karmanodes, 1 for Wallet Staking</td></tr>
<tr><td>Coin Maturity to Stake</td><td>150 Blocks</td></tr>
</table>

The Ohmcoin development budget is up to a maximum of 1 OHMC per block, paid out based on approved proposals as voted on by the Ohmcoin karmanode owners through the community governance process.
### Rewards Breakdown

<table>
<th>Phase</th><th>Block Height</th><th>Rewards Created Per Block</th><th>Rewards Created Per Day</th>
<tr><td>Phase 1</td><td>1000-904320</td><td>1 OHMC</td><td>2880 OHMC</td></tr>
<tr><td>Phase 2</td><td>904321-1336320</td><td>.5 OHMC</td><td>1440 OHMC</td></tr>
<tr><td>Phase 3</td><td>1336321-1941121</td><td>.25 OHMC</td><td>720 OHMC</td></tr>
<tr><td>Phase 4</td><td>1941122-2373122</td><td>0.125 OHMC</td><td>360 OHMC</td></tr>
<tr><td>Phase 5</td><td>2373123-2977923</td><td>0.0625 OHMC</td><td>180 OHMC</td></tr>
<tr><td>Phase 6</td><td>2977924-4029124</td><td>0.03125 OHMC</td><td>90 OHMC</td></tr>
<tr><td>Phase 7</td><td>4029125-561599</td><td>0.015625 OHMC</td><td>45 OHMC</td></tr>
<tr><td>Phase 8</td><td>6131525-8233926</td><td>0.0078125 OHMC</td><td>22.5 OHMC</td></tr>
<tr><td>Phase 9</td><td>8233927-10336327</td><td>0.00390625 OHMC</td><td>11.25 OHMC</td></tr>
<tr><td>Phase X</td><td>10336328-Infinite</td><td>0.001953125 OHMC</td><td>5.625 OHMC</td></tr>
</table>
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 6)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
Expand Down
4 changes: 2 additions & 2 deletions contrib/bitrpc/bitrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@


if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:11772")
access = ServiceProxy("http://127.0.0.1:52021")
else:
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:11772")
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:52021")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
#rpcport=11772
#rpcport=52021

# You can use Ohmcoin or ohmcoind to send commands to Ohmcoin/ohmcoind
# running on another host using this option:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Username for JSON\-RPC connections
Password for JSON\-RPC connections
.TP
\fB\-rpcport=\fR<port>
Listen for JSON\-RPC connections on <port> (default: 11772 or testnet: 11774)
Listen for JSON\-RPC connections on <port> (default: 52021 or testnet: 11774)
.TP
\fB\-rpcallowip=\fR<ip>
Allow JSON\-RPC connections from specified IP address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You must set *rpcpassword* to secure the JSON-RPC api.
\fBrpcallowip=\fR\fI'192.168.1.*'\fR
By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
.TP
\fBrpcport=\fR\fI'11772'\fR
\fBrpcport=\fR\fI'52021'\fR
Listen for RPC connections on this TCP port.
.TP
\fBrpcconnect=\fR\fI'127.0.0.1'\fR
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion contrib/linearize/linearize-hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
settings['port'] = 11772
settings['port'] = 52021
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:
Expand Down
2 changes: 1 addition & 1 deletion contrib/spendfrom/spendfrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def connect_JSON(config):
testnet = config.get('testnet', '0')
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
if not 'rpcport' in config:
config['rpcport'] = 11774 if testnet else 11772
config['rpcport'] = 11774 if testnet else 52021
connect = "http://%s:%[email protected]:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
try:
result = ServiceProxy(connect)
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Ohmcoin Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.3.3
PROJECT_NUMBER = 3.0.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
24 changes: 12 additions & 12 deletions doc/karmanode-budget.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Budgets go through a series of stages before being paid:
Prepare collateral transaction
------------------------

mnbudget prepare \<proposal-name\> \<url\> \<payment_count\> \<block_start\> \<ohmcoin_address\> \<monthly_payment_ohmcoin\> [use_ix(true|false)]
knbudget prepare \<proposal-name\> \<url\> \<payment_count\> \<block_start\> \<ohmcoin_address\> \<monthly_payment_ohmcoin\> [use_ix(true|false)]

Example:
```
mnbudget prepare cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 true
knbudget prepare cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 true
```

Output: `464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0` - This is the collateral hash, copy this output for the next step
Expand All @@ -32,11 +32,11 @@ In this transaction we prepare collateral for "_cool-project_". This proposal wi
Submit proposal to network
------------------------

mnbudget submit \<proposal-name\> \<url\> \<payment_count\> \<block_start\> \<ohmcoin_address\> \<monthly_payment_ohmcoin\> \<collateral_hash\>
knbudget submit \<proposal-name\> \<url\> \<payment_count\> \<block_start\> \<ohmcoin_address\> \<monthly_payment_ohmcoin\> \<collateral_hash\>

Example:
```
mnbudget submit cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0
knbudget submit cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0
```

Output: `a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491` - This is your proposal hash, which other nodes will use to vote on it
Expand All @@ -46,11 +46,11 @@ Lobby for votes

Double check your information:

mnbudget getinfo \<proposal-name\>
knbudget getinfo \<proposal-name\>

Example:
```
mnbudget getinfo cool-project
knbudget getinfo cool-project
```
Output:
```
Expand All @@ -77,23 +77,23 @@ Output:

If everything looks correct, you can ask for votes from other karmanodes. To vote on a proposal, load a wallet with _karmanode.conf_ file. You do not need to access your cold wallet to vote for proposals.

mnbudget vote \<proposal_hash\> [yes|no]
knbudget vote \<proposal_hash\> [yes|no]

Example:
```
mnbudget vote a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491 yes
knbudget vote a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491 yes
```

Output: `Voted successfully` - Your vote has been submitted and accepted.

Make it into the budget
------------------------

After you get enough votes, execute `mnbudget projection` to see if you made it into the budget. If you the budget was finalized at this moment which proposals would be in it. Note: Proposals must be active at least 1 day on the network and receive 10% of the karmanode network in yes votes in order to qualify (E.g. if there is 2500 karmanodes, you will need 250 yes votes.)
After you get enough votes, execute `knbudget projection` to see if you made it into the budget. If you the budget was finalized at this moment which proposals would be in it. Note: Proposals must be active at least 1 day on the network and receive 10% of the karmanode network in yes votes in order to qualify (E.g. if there is 2500 karmanodes, you will need 250 yes votes.)

Example:
```
mnbudget projection
knbudget projection
```

Output:
Expand Down Expand Up @@ -145,7 +145,7 @@ RPC Commands
------------------------

The following new RPC commands are supported:
- mnbudget "command"... ( "passphrase" )
- knbudget "command"... ( "passphrase" )
* prepare - Prepare proposal for network by signing and creating tx
* submit - Submit proposal for network
* vote-many - Vote on a Ohmcoin initiative
Expand All @@ -157,7 +157,7 @@ The following new RPC commands are supported:
* projection - Show the projection of which proposals will be paid the next cycle
* check - Scan proposals and remove invalid

- mnfinalbudget "command"... ( "passphrase" )
- knfinalbudget "command"... ( "passphrase" )
* vote-many - Vote on a finalized budget
* vote - Vote on a finalized budget
* show - Show existing finalized budgets
6 changes: 3 additions & 3 deletions doc/release-notes/release-notes-2.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ For the `list` (aka `karmanodelist`) parameter, the various "modes" have been re
]
```

#### mnbudget command
#### knbudget command

An additional parameter has been added to `mnbudget` to allow a controller wallet to issue per-MN votes. The new parameter is `vote-alias` and it's use format is as follows:
An additional parameter has been added to `knbudget` to allow a controller wallet to issue per-MN votes. The new parameter is `vote-alias` and it's use format is as follows:

`mnbudget vote-alias <proposal-hash> <yes|no> <alias>`
`knbudget vote-alias <proposal-hash> <yes|no> <alias>`

All fields are required to successfully vote.

Expand Down
34 changes: 17 additions & 17 deletions doc/release-notes/release-notes-2.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ RPC changes
| `karmanode create` | | removed - not implemented |
| `karmanode calcscore` | `listkarmanodescores` | |
| --- | --- | --- |
| `mnbudget prepare` | `preparebudget` | see notes below |
| `mnbudget submit` | `submitbudget` | see notes below |
| `mnbudget vote-many` | `mnbudgetvote` | see notes below |
| `mnbudget vote-alias` | `mnbudgetvote` | see notes below |
| `mnbudget vote` | `mnbudgetvote` | see notes below |
| `mnbudget getvotes` | `getbudgetvotes` | |
| `mnbudget getinfo` | `getbudgetinfo` | see notes below |
| `mnbudget show` | `getbudgetinfo` | see notes below |
| `mnbudget projection` | `getbudgetprojection` | |
| `mnbudget check` | `checkbudgets` | |
| `mnbudget nextblock` | `getnextsuperblock` | |
| `knbudget prepare` | `preparebudget` | see notes below |
| `knbudget submit` | `submitbudget` | see notes below |
| `knbudget vote-many` | `knbudgetvote` | see notes below |
| `knbudget vote-alias` | `knbudgetvote` | see notes below |
| `knbudget vote` | `knbudgetvote` | see notes below |
| `knbudget getvotes` | `getbudgetvotes` | |
| `knbudget getinfo` | `getbudgetinfo` | see notes below |
| `knbudget show` | `getbudgetinfo` | see notes below |
| `knbudget projection` | `getbudgetprojection` | |
| `knbudget check` | `checkbudgets` | |
| `knbudget nextblock` | `getnextsuperblock` | |

##### `startkarmanode` Command #####
This command now handles all cases for starting a karmanode instead of having multiple commands based on the context. Command arguments have changed slightly to allow the user to decide wither or not to re-lock the wallet after the command is run. Below is the help documentation:
Expand Down Expand Up @@ -105,11 +105,11 @@ Examples:
##### `preparebudget` & `submitbudget` Commands #####
Due to the requirement of maintaining backwards compatibility with the legacy command, these two new commands are created to handle the preparation/submission of budget proposals. Future intention is to roll these two commands back into a single command to reduce code-duplication. Paramater arguments currently remain unchanged from the legacy command equivilent.

##### `mnbudgetvote` Command #####
This command now handles all cases for submitting MN votes on a budget proposal. Backwards compatibility with the legacy command(s) has been retained, with the exception of the `vote-alias` case due to a conflict in paramater type casting. A user running `mnbudget vote-alias` will be instructed to instead use the new `mnvote` command. Below is the full help documentation for this new command:
##### `knbudgetvote` Command #####
This command now handles all cases for submitting MN votes on a budget proposal. Backwards compatibility with the legacy command(s) has been retained, with the exception of the `vote-alias` case due to a conflict in paramater type casting. A user running `knbudget vote-alias` will be instructed to instead use the new `mnvote` command. Below is the full help documentation for this new command:

```
mnbudgetvote "local|many|alias" "votehash" "yes|no" ( "alias" )
knbudgetvote "local|many|alias" "votehash" "yes|no" ( "alias" )

Vote on a budget proposal

Expand All @@ -133,12 +133,12 @@ Result:
}

Examples:
> pivx-cli mnbudgetvote "local" "ed2f83cedee59a91406f5f47ec4d60bf5a7f9ee6293913c82976bd2d3a658041" "yes"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "mnbudgetvote", "params": ["local" "ed2f83cedee59a91406f5f47ec4d60bf5a7f9ee6293913c82976bd2d3a658041" "yes"] }' -H 'content-type: text/plain;' http://127.0.0.1:51473/
> pivx-cli knbudgetvote "local" "ed2f83cedee59a91406f5f47ec4d60bf5a7f9ee6293913c82976bd2d3a658041" "yes"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "knbudgetvote", "params": ["local" "ed2f83cedee59a91406f5f47ec4d60bf5a7f9ee6293913c82976bd2d3a658041" "yes"] }' -H 'content-type: text/plain;' http://127.0.0.1:51473/
```

##### `getbudgetinfo` Command #####
This command now combines the old `mnbudget show` and `mnbudget getinfo` commands to reduce code duplication while still maintaining backwards compatibility with the legacy commands. Given no parameters, it returns the full list of budget proposals (`mnbudget show`). A single optional parameter allows to return information on just that proposal (`mnbudget getinfo`). Below is the full help documentation:
This command now combines the old `knbudget show` and `knbudget getinfo` commands to reduce code duplication while still maintaining backwards compatibility with the legacy commands. Given no parameters, it returns the full list of budget proposals (`knbudget show`). A single optional parameter allows to return information on just that proposal (`knbudget getinfo`). Below is the full help documentation:

```
getbudgetinfo ( "proposal" )
Expand Down
6 changes: 3 additions & 3 deletions doc/swifttx.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ When a "Transaction Lock" occurs the hash of the related transaction is broadcas
* `zmqpubrawtxlock`: publishes the raw transaction when locked via SwiftX
* `zmqpubhashtxlock`: publishes the transaction hash when locked via SwiftX

This mechanism has been integrated into Bitcore-Node-PHore which allows for notification to be broadcast through Insight API in one of two ways:
* WebSocket: [https://github.com/theohmproject/insight-api-ohmcoin#web-socket-api](https://github.com/theohmproject/insight-api-ohmcoin#web-socket-api)
* API: [https://github.com/theohmproject/insight-api-ohmcoin#swifttx-transactions](https://github.com/theohmproject/insight-api-ohmcoin#swifttx-transactions)
This mechanism has been integrated into Bitcore-Node-Ohmocoin which allows for notification to be broadcast through Insight API in one of two ways:
* WebSocket: [https://github.com/theohmproject/insight-api-ohmcoin#web-socket-api](https://github.com/theohmproject/insight-api-ohmcoin#web-socket-api)
* API: [https://github.com/theohmproject/insight-api-ohmcoin#swifttx-transactions](https://github.com/theohmproject/insight-api-ohmcoin#swifttx-transactions)

####Command line option

Expand Down
Loading