Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 #18

Merged
merged 1 commit into from
Oct 31, 2023
Merged

V3 #18

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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: Community Discussion
url: https://coretalk.space/tags/cip
about: Share your CIP comments in Talk \#CIP
about: Share your CIP comments in Core Talk CIP
- name: Security Bugs
url: https://dev.coreblockchain.net/report-bug/
about: Please report security vulnerabilities here.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can begin by opening your proposal under the [issues section of this reposit

### Review

- [What is CIP](/docs/what-is-cip)
- [What is a CIP](/docs/what-is-cip)
- [CIP rationale](/docs/cip-rationale)
- [CIP categories](/docs/cip-categories)
- [CIP workflow](/docs/cip-workflow)
Expand All @@ -17,8 +17,12 @@ You can begin by opening your proposal under the [issues section of this reposit

### How to start

1. Review the template [cip-0](https://github.com/core-coin/cip/blob/master/cip/docs/cip-0.md)
2. [Create a CIP in the Online Editor](https://github.com/core-coin/cip/new/master?filename=cip/cip-0.md&message=CIP%20Proposal&description=CIP%20Proposal%20Draft&value=---%0Acip%3A%20%0Atitle%3A%20%0Aauthor%3A%20%0Alang%3A%20en-US%0Atag%3A%20draft%0Acategory%3A%20%0Adate%3A%202022-12-01%0A---%0A%3C%21--Introduction--%3E%0A%0A%3C%21--truncate--%3E%0A%0A%23%23%20Abstract%0A%0A%0A%0A%23%23%20Motivation%0A%0A%0A%0A%23%23%20Specification%0A%0A%0A%0A%23%23%20Rationale%0A%0A%0A%0A%23%23%20Backwards%20Compatibility%0A%0A%0A%0A%23%23%20Test%20Cases%0A%0A%0A%0A%23%23%20Implementation%0A%0A%0A%0A%23%23%20Security%20Considerations%0A%0A%0A%0A%23%23%20Copyright%0A%0ACopyright%20and%20related%20rights%20waived%20via%20%5BCC0%5D%28https%3A%2F%2Fcreativecommons.org%2Fpublicdomain%2Fzero%2F1.0%2F%29.%0A)
Begin by contributing to the [issues section of this repository](https://github.com/core-coin/cip/issues/new/choose). Once done, you'll be able to draft a CIP using the associated issue number (if available).

**Next steps:**

1. Review the template [cip-0](/docs/cip-0.md)
2. [Create a CIP in the Online Editor](https://github.com/core-coin/cip/new/master?filename=cip/cip-0.md&message=CIP%20Proposal&description=CIP%20Proposal%20Draft&value=---%0Acip%3A%20%0Atitle%3A%20%0Adescription%3A%20%0Akeywords%3A%20%5B%5D%0Aauthor%3A%20%0Alang%3A%20en-US%0Atags%3A%20%5Bdraft%5D%0Acategories%3A%20%5B%5D%0Adate%3A%202022-12-01%0Adiscussions-to%3A%20%0A---%0A%3C%21--Introduction--%3E%0A%0A%3C%21--truncate--%3E%0A%0A%23%23%20Abstract%0A%0A%0A%0A%23%23%20Motivation%0A%0A%0A%0A%23%23%20Specification%0A%0A%0A%0A%23%23%20Rationale%0A%0A%0A%0A%23%23%20Backwards%20Compatibility%0A%0A%0A%0A%23%23%20Test%20Cases%0A%0A%0A%0A%23%23%20Implementation%0A%0A%0A%0A%23%23%20Security%20Considerations%0A%0A%0A%0A%23%23%20Copyright%0A%0ACopyright%20and%20related%20rights%20waived%20via%20%5BCC0%5D%28https%3A%2F%2Fcreativecommons.org%2Fpublicdomain%2Fzero%2F1.0%2F%29.%0A)

Or

Expand Down Expand Up @@ -50,11 +54,3 @@ CIPs are categorized into various types, each with its own list:

- [Core ◆ Talk](https://coretalk.space/tags/cip)
- [GH Issues](https://github.com/core-coin/cip/issues)

## License of the content

[CC0 “No Rights Reserved”](https://creativecommons.org/share-your-work/public-domain/cc0/)

## License of the app

[CORE License](LICENSE)
Empty file added cip/cbc/.gitkeep
Empty file.
7 changes: 4 additions & 3 deletions cip/cip-100.md → cip/cbc/cip-100.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
cip: 100
title: ICAN
description: International Crypto Account Number
keywords: [cip, cip-100, ican, international, crypto, account, number]
author: Rastislav Vašička (@[email protected])
lang: en-US
tag: final
category: cbc
tags: [final]
categories: [cbc]
date: 2022-01-02
star: true
---
We are introducing a standard for crypto addresses — ICAN — with HRP and checksum, similar to what we are all using for current financial transactions. ICAN stands for International Crypto Account Number.
Only hexadecimal characters are used to minimize the size of the address in the Blockchain storage.
Expand Down
8 changes: 5 additions & 3 deletions cip/cip-20.md → cip/cbc/cip-20.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
cip: 20
title: Token Standard
description: A standard interface for tokens.
keywords: [cip, cip-20, token, standard]
author: Mojtaba
lang: en-US
tag: final
category: cbc
tags: [final]
categories: [cbc]
date: 2022-05-28
star: true
---
A standard interface for tokens.

Expand All @@ -27,6 +28,7 @@ A standard interface allows any tokens on Core to be re-used by other applicatio
#### Methods

**NOTES**:

- The following specifications use syntax from Ylem `0.8.4` (or above).
- Callers MUST handle `false` from `returns (bool success)`. They MUST NOT assume that `false` is never returned!

Expand Down
Empty file added cip/core/.gitkeep
Empty file.
34 changes: 18 additions & 16 deletions cip/cip-98.md → cip/core/cip-98.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
cip: 98
title: Core Cryptography Scheme
description: The cryptography scheme employed in the Core Blockchain.
keywords: [cip, cip-98, cryptography, scheme, core, blockchain]
author: Dmitry (@todesstile)
lang: en-US
tag: final
category: core
tags: [final]
categories: [core]
date: 2022-06-16
---
This standard details the cryptography scheme employed in the Core Blockchain.
Expand Down Expand Up @@ -45,22 +47,22 @@ If the most significant bit of the last byte (little endian) of the private key

Given that the `privateKey` is represented by `byte[57]`, the overarching scheme can be elucidated as follows:

```
```go
if (privateKey[56] & 0x80 == 0x00) {
// Most significant bit of the last byte equals 0, process as usual:
output = SHAKE256(privateKey, 114)
left = output[0:57]
right = output[57:114]
// ....
// Most significant bit of the last byte equals 0, process as usual:
output = SHAKE256(privateKey, 114)
left = output[0:57]
right = output[57:114]
// ....
} else {
// Most significant bit of the last byte equals 1:
scalar = privateKey
scalar[0] &= 0xfc
scalar[56] = 0
scalar[55] |= 0x80
left = scalar
right = scalar
// then proceed as usual
// Most significant bit of the last byte equals 1:
scalar = privateKey
scalar[0] &= 0xfc
scalar[56] = 0
scalar[55] |= 0x80
left = scalar
right = scalar
// then proceed as usual
}
```

Expand Down
24 changes: 13 additions & 11 deletions cip/cip-99.md → cip/core/cip-99.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
cip: 99
title: Core HD-Wallet Scheme
description: The HD-wallet derivation scheme for Core Coin.
keywords: [cip, cip-99, hd-wallet, scheme, core, coin]
author: Dmitry (@todesstile)
lang: en-US
tag: final
category: core
tags: [final]
categories: [core]
date: 2022-06-16
---
This standard outlines the HD-wallet derivation scheme for Core Coin.
Expand Down Expand Up @@ -39,15 +41,15 @@ An extended key is represented by a [114]byte array. It is derived from `chainco

The master key forms the root of the HD-derivation tree. It can be derived from mnemonics using a slightly modified version of the BIP39 scheme. You should adhere to this scheme until obtaining the seed (BIP39 Seed). The master key can then be derived as:

```
```go
chain = H(seed, "mnemonicforthechain")
key = H(seed, "mnemonicforthekey")
masterKey = chain || key
```

For enhanced security, you should:

```
```txt
set the most significant bit of the last byte to 1 (masterKey[113] |= 0x80)
set the most significant bit of the next-to-last byte to 1 (masterKey[112] |= 0x80)
clear the second significant bit of the next-to-last byte (masterKey[112] &= 0xbf)
Expand All @@ -61,35 +63,35 @@ You can always generate `pubKey` from `privKey`. This operation will be denoted

Child chaincode generation varies between usual and hardened keys. For a usual key:

```
```go
pubKey = private2public(privKey)
childChain = H(0x03 || pubKey || i , chain), where i < 2^31
```

For a hardened key:

```
```go
childChain = H(0x01 || privKey || i , chain), where i >= 2^31
```

### Child Pair Generation: Private Key to Private Key

Child private key generation also differs between usual and hardened keys. For a usual key:

```
```go
pubKey = private2public(privKey)
template = H(0x02 || pubKey || i , chain), where i < 2^31
```

For a hardened key:

```
```go
template = H(0x00 || privKey || i , chain), where i >= 2^31
```

Next, nullify the top 4 bytes and the last 2 bits of the template for security reasons, resulting in the `clampedTemplate = clamp(template)`. Then, the child `privKey` can be computed as:

```
```go
childPrivKey = privKey + clampedTemplate
```

Expand All @@ -105,14 +107,14 @@ It is impossible to generate a child public key from a hardened public key, whic

However, usual child public keys can be derived from a usual parent public key. First, calculate the `clampedTemplate` as described above:

```
```go
template = H(0x02 || publicKey || i , chain), where i < 2^31
template -> clampedTemplate
```

Next, compute a point on Ed448 corresponding to the `clampedTemplate` and add it to the `publicKey` using point addition for Ed448:

```
```go
point = private2public(clampedTemplate)
childPublicKey = publicKey +++ point
```
Expand Down
Empty file added cip/informational/.gitkeep
Empty file.
Empty file added cip/interface/.gitkeep
Empty file.
Empty file added cip/meta/.gitkeep
Empty file.
Empty file added cip/networking/.gitkeep
Empty file.
26 changes: 21 additions & 5 deletions docs/cip-0.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
---
title: CIP-0 example
description: CIP-0 example template
author: Core Foundation
comment: false
date: 2022-01-01
sidebar_position: 7
---
**Frontmatter:**

```yaml
---
cip: 0
title: CIP-0 example
description: CIP-0 example template
keywords: [cip, cip-0, example, template]
author: Author (@[email protected])
lang: en-US
tag: draft
category: example
tags: [draft]
categories: [example]
date: 2022-01-01
sidebar_position: 7
discussions-to: <URL>
requires: <CIP number(s)> # Only required when you reference an CIP in the `Specification` section. Otherwise, remove this field.
---
> This is the suggested template for new CIPs. Note that a CIP number will be assigned by an editor. When opening a pull request to submit your CIP, please use an abbreviated title in the filename, `cip-ID.md`, where "ID" is the CIP ID. The title should be 44 characters or fewer.
```

> This is the suggested template for new CIPs. Note that a CIP number will be assigned by an editor. When opening a pull request to submit your CIP, please, use an abbreviated title in the filename, `cip-ID.md`, where "ID" is the CIP ID. The title should be 44 characters or fewer.

> Provide a simplified and layperson-accessible explanation of the CIP.

Expand Down Expand Up @@ -44,7 +60,7 @@ sidebar_position: 7

## Security Considerations

> All CIPs must contain a section discussing the security implications and considerations relevant to the proposed change. This section should provide details important for security discussions, highlight potential risks, and be referenced throughout the lifecycle of the proposal. CIP submissions lacking the "Security Considerations" section will be rejected. A CIP cannot proceed to "Final" status without a Security Considerations discussion deemed satisfactory by the reviewers.
> All CIPs must contain a section discussing the security implications and considerations relevant to the proposed change. This section should provide details important for security discussions, highlight potential risks, and be referenced throughout the lifecycle of the proposal. CIP submissions lacking the "Security Considerations" section will be rejected. A CIP cannot proceed to the "Final" status without a Security Considerations discussion deemed satisfactory by the reviewers.

## Copyright

Expand Down
5 changes: 0 additions & 5 deletions docs/cip-categories.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: CIP Categories
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 4
---
Expand Down
5 changes: 0 additions & 5 deletions docs/cip-editors.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: CIP Editors
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 6
---
Expand Down
5 changes: 0 additions & 5 deletions docs/cip-rationale.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: CIP Rationale
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 3
---
Expand Down
9 changes: 2 additions & 7 deletions docs/cip-workflow.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: CIP Work Flow
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 5
---
Expand Down Expand Up @@ -53,11 +48,11 @@ Every stage transition requires the CIP author's request and subsequent approval
- **Deferred**: For core CIPs postponed for an upcoming hard fork.
- **Rejected**: Either a fundamentally flawed CIP or a Core CIP declined by Core Devs.
- **Active**: Similar to Final, but can undergo updates without changing the CIP number.
- **Superseded**: A once-final CIP no longer represents the zenith. Another "Final" CIP references the outdated one.
- **Superseeded**: A once-final CIP no longer represents the zenith. Another "Final" CIP references the outdated one.

## Pillars of a Successful CIP

Each CIP should encapsulate
Each CIP should encapsulate:

- **Preamble**: RFC 822 headers detailing CIP metadata.
- **Simple Summary**: An easy-to-understand synopsis.
Expand Down
15 changes: 7 additions & 8 deletions docs/cip.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: Core Improvement Proposals
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 1
---
Expand All @@ -20,7 +15,7 @@ You can begin by opening your proposal under the [issues section of this reposit

### Review

- [What is CIP](/docs/what-is-cip)
- [What is a CIP](/docs/what-is-cip)
- [CIP rationale](/docs/cip-rationale)
- [CIP categories](/docs/cip-categories)
- [CIP workflow](/docs/cip-workflow)
Expand All @@ -29,8 +24,12 @@ You can begin by opening your proposal under the [issues section of this reposit

### How to start

1. Review the template [cip-0](https://github.com/core-coin/cip/blob/master/cip/docs/cip-0.md)
2. [Create a CIP in the Online Editor](https://github.com/core-coin/cip/new/master?filename=cip/cip-0.md&message=CIP%20Proposal&description=CIP%20Proposal%20Draft&value=---%0Acip%3A%20%0Atitle%3A%20%0Aauthor%3A%20%0Alang%3A%20en-US%0Atag%3A%20draft%0Acategory%3A%20%0Adate%3A%202022-12-01%0A---%0A%3C%21--Introduction--%3E%0A%0A%3C%21--truncate--%3E%0A%0A%23%23%20Abstract%0A%0A%0A%0A%23%23%20Motivation%0A%0A%0A%0A%23%23%20Specification%0A%0A%0A%0A%23%23%20Rationale%0A%0A%0A%0A%23%23%20Backwards%20Compatibility%0A%0A%0A%0A%23%23%20Test%20Cases%0A%0A%0A%0A%23%23%20Implementation%0A%0A%0A%0A%23%23%20Security%20Considerations%0A%0A%0A%0A%23%23%20Copyright%0A%0ACopyright%20and%20related%20rights%20waived%20via%20%5BCC0%5D%28https%3A%2F%2Fcreativecommons.org%2Fpublicdomain%2Fzero%2F1.0%2F%29.%0A)
Begin by contributing to the [issues section of this repository](https://github.com/core-coin/cip/issues/new/choose). Once done, you'll be able to draft a CIP using the associated issue number (if available).

**Next steps:**

1. Review the template [cip-0](/docs/cip-0.md)
2. [Create a CIP in the Online Editor](https://github.com/core-coin/cip/new/master?filename=cip/cip-0.md&message=CIP%20Proposal&description=CIP%20Proposal%20Draft&value=---%0Acip%3A%20%0Atitle%3A%20%0Adescription%3A%20%0Akeywords%3A%20%5B%5D%0Aauthor%3A%20%0Alang%3A%20en-US%0Atags%3A%20%5Bdraft%5D%0Acategories%3A%20%5B%5D%0Adate%3A%202022-12-01%0Adiscussions-to%3A%20%0A---%0A%3C%21--Introduction--%3E%0A%0A%3C%21--truncate--%3E%0A%0A%23%23%20Abstract%0A%0A%0A%0A%23%23%20Motivation%0A%0A%0A%0A%23%23%20Specification%0A%0A%0A%0A%23%23%20Rationale%0A%0A%0A%0A%23%23%20Backwards%20Compatibility%0A%0A%0A%0A%23%23%20Test%20Cases%0A%0A%0A%0A%23%23%20Implementation%0A%0A%0A%0A%23%23%20Security%20Considerations%0A%0A%0A%0A%23%23%20Copyright%0A%0ACopyright%20and%20related%20rights%20waived%20via%20%5BCC0%5D%28https%3A%2F%2Fcreativecommons.org%2Fpublicdomain%2Fzero%2F1.0%2F%29.%0A)

Or

Expand Down
5 changes: 0 additions & 5 deletions docs/what-is-cip.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: What is a CIP
isOriginal: true
author: Core Foundation
date: 2022-01-01
category:
- tutorial
tag:
- tutorial
comment: false
sidebar_position: 2
---
Expand Down
Loading