Instantly share code, notes, and snippets.

Embed
What would you like to do?
Omni Core feature activation: key-generation

Features and new transaction types of Omni Core are activated remotely via specially crafted on-chain transactions, signed by a group of stakeholders.

The following guide shows how to generate a new key-pair, which is later used to sign activation transactions.

1. Start Omni Core (or Bitcoin Core)

Build or download Omni Core, or Bitcoin Core, and ideally in a presitine environment, start the client in mainnet mode (default). No blockchain synchronization or internet access is required.

Overview

2. Open the debug window

Navigate to Help - Debug window.

Debug window

3. Head over to the debug console

Head over to the debug console by clicking on Console.

Console

4. Generate new key-pair

To generate a new key, type getnewaddress. A base58 encoded Bitcoin address will be shown. Copy or write down the address.

getnewaddress

5. Show public key

Type validateaddress <thenewaddress> to show information related to the new key-pair. Copy or write down the public key "pubkey".

validateaddress

6. Dump private key

Type dumpprivkey <thenewaddress> to show the related private key. Write down the private key, but do not share the key with anyone.

dumpprivkey

7. Data to collect

To summarize, please store the following data:

  • the base58 encoded Bitcoin address: 1BdGoDRhuz1gnWE4GdaPiTNBXwfrLNpaXp
  • it's public key: 023f71374bb347d0db127221004b34f13e14dcf6667acadd5727672b8cfc43e071
  • it's private key: KwqyDvy23Y2hF222az7UTk46FjDqkggNfQv7Br75zPv1k9iRok7F

Please do not lose this information, and please keep this information safe!

You may clear or wipe the datadir of Bitcoin or Omni Core afterwards.

8. Submit your information

Please contact one of the maintainers of Omni Core and submit:

  1. the base58 encoded address
  2. the public key
  3. your name or pseudonym
  4. an email address where you can be reached
  5. a short note, describing your role (e.g. project maintainer, foundation member, ...)

Do not submit your private key.

This information will be published and hardcoded into the source code of Omni Core.

It is expected that you are available via the provided contact email address within one week.

If your information is no longer valid, for example, if your role or email address changes, or in case you lose your private key, please contact one of the project maintainers of Omni Core immediately!

9. What's next?

At some point you will be contacted by one of the project maintainers, and asked to sign an activation transaction.

A follow-up guide and further instructions will be provided.

The following data will be used to create a 4-of-5 multisig script:

1883ZMsRJfzKNozUBJBTCxQ7EaiNioNDWz
02d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b
Zathras
zathras@omni.foundation
Project maintainer, developer
1HHv91gRxqBzQ3gydMob3LU8hqXcWoLfvd
036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7
dexx
dexx@bitwatch.co
Project maintainer, developer
1oyvGmABkeFRUECn2t8DEZPes6F7Gsc9T
0499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf321
J.R. Willett
jr@omni.foundation
Founder and Board Member
17xr7sbehYY4YSZX9yuJe6gK9rrdRrZx26
04b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f
Craig Sellars
craig@omni.foundation
Technologist and Board Member
16oDZYCspsczfgKXVj3xyvsxH21NpEj94F
04e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b29678
Adam Chamely
adam@omni.foundation
Project maintainer, developer

The public keys are sorted.

The 4-of-5 multisig script is created in Bitcoin or Omni Core with:

createmultisig 4 '["02d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b", "036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7", "0499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf321", "04b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f", "04e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b29678"]'

Result:

{
  "address": "3Fc5gWzEQh1YGeqVXH6E4GDEGgbZJREJQ3",
  "redeemScript": "542102d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b21036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7410499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf3214104b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f4104e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b2967855ae"
}

Or alternatively:

addmultisigaddress 4 '["02d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b", "036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7", "0499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf321", "04b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f", "04e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b29678"]'

Result:

3Fc5gWzEQh1YGeqVXH6E4GDEGgbZJREJQ3

It can then be confirmed with:

validateaddress "3Fc5gWzEQh1YGeqVXH6E4GDEGgbZJREJQ3"

Result:

{
  "isvalid": true,
  "address": "3Fc5gWzEQh1YGeqVXH6E4GDEGgbZJREJQ3",
  "scriptPubKey": "a91498a2d17e08ac677dc220b92e0b79406f2f441c2487",
  "ismine": false,
  "iswatchonly": false,
  "isscript": true,
  "script": "multisig",
  "hex": "542102d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b21036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7410499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf3214104b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f4104e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b2967855ae",
  "addresses": [
    "1883ZMsRJfzKNozUBJBTCxQ7EaiNioNDWz",
    "1HHv91gRxqBzQ3gydMob3LU8hqXcWoLfvd",
    "1oyvGmABkeFRUECn2t8DEZPes6F7Gsc9T",
    "17xr7sbehYY4YSZX9yuJe6gK9rrdRrZx26",
    "16oDZYCspsczfgKXVj3xyvsxH21NpEj94F"
  ],
  "sigsrequired": 4,
  "account": ""
}

1. Introduction

To test the "shared signing" a test transaction was created to transfer 0.1 TOMNI.

2. Requirements

To continue, you need the following:

  • ideally a prestine/secure environment
  • private signing key (from 7. Data to collect)
  • Omni Core or Bitcoin Core

No blockchain synchronization or internet access is required. The private signing key doens't need to be imported.

3. Start Omni Core (or Bitcoin Core)

Build or download Omni Core, or Bitcoin Core, and ideally in a presitine environment, start the client in mainnet mode (default). No blockchain synchronization or internet access is required.

Overview

4. Open the debug window

Navigate to Help - Debug window.

Debug window

5. Head over to the debug console

Head over to the debug console by clicking on Console.

Console

6. Sign raw transaction

Copy the following and replace PRIVATE_KEY with your signing key, then enter it in the debug console:

signrawtransaction "0100000001f72efade5690ab939aa121c436101ff0debc7e5f05638b6366aa2fe144a707a200000000fd59010047304402206016fcbea57a75a2c6fd3853a52acdf25b5ba6944c6df54119dd5b258d3133cf022029189e5062332640e4114451f40f6845e24c7a412445c84dd6ab90263a1a85c0014d0d01542102d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b21036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7410499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf3214104b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f4104e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b2967855aeffffffff03ac020000000000004751210394abb6fe6d492495f855ab3fa29acd6be04f347d17597985da0e8c70a26036f2210258785fd620c3f80f730dc719245d71109e546d1f00f0acf95b338c6109855a1252ae22020000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac22020000000000001976a914f7958092f4af2ca5f90ef592f9eb9732d06c814188ac00000000" '[{"txid":"a207a744e12faa66638b63055f7ebcdef01f1036c421a19a93ab9056defa2ef7","vout":0,"scriptPubKey":"a91498a2d17e08ac677dc220b92e0b79406f2f441c2487","redeemScript":"542102d797b8526701a3dfdb52d11f89377e0288b14e29b1414d64de065cd337069c3b21036a4caa95ec1d55f1b75a8b6c7345f22b4efc9e25d38ab058ef7d6f60b3b744f7410499e86235a6a98fc295d7cfe641d37409f2840ad32e0211579cae488bd86cf01daf7ad8f082d968ea4bca77e794fffd1a31583f36f37b1198e51d0651cdbcf3214104b7a3d7f7ccdf211dfd180815b87332b4773cc40bff72a4d0bb60f3a85409d19f99709331c6b11c976fe274a86d789a1cf2b3b0be29fe5fc55c93ad9e08459c4f4104e65b098558d637cfcf3194214637f8838338b141259b698d2a027b069d405b6502ad4a4e9aa75094fa431a6c9af580f5917834a6d4cec946054df33194b2967855ae"}]' '["PRIVATE_KEY"]'

As result a new raw transaction is returned. An error is shown, if the transaction is only partially signed. This is expected.

7. Send partially signed raw transaction to the other signers

Copy the partially signed transaction and send it via email to the other signers. See the email template for an example email.

Step 6 and 7 need to be repeated until the transaction was signed by at least 4 of 5 signers.

8. Broadcast transaction

Once at least 4 of 5 signers signed the transaction, it can be broadcasted.

This should be documented and details for this step may follow.

This template may be used for the internal communication and passing around a partially signed transaction:

##### Subject:

Feature activation: identifier 1, revision 3

##### To:

zathras@omni.foundation, dexx@bitwatch.co, jr@omni.foundation, craig@omni.foundation, adam@omni.foundation

##### Message:

Hi Omni team,

I signed the activation transaction for feature identifier 1, which updates the revision from 2 to 3. Please complete the transaction as described in the signing instructions.

Feature identifier:

  1

Status:

- [x] Zathras
- [x] dexx
- [ ] J.R. Willett
- [ ] Craig Sellars
- [x] Adam Chamely

Updated signing command:

  signrawtransaction "01000000..00" '[{"txid":"a2..87","redeemScript":"54..ae"}]' '["PRIVATE_KEY"]'

Please make sure you sign the latest version with the highest revision and update it's status.

Replace the first part of the signing command, the actual raw transaction, with the version you signed.

Do not insert your private signing key into the email, but use a placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment