Skip to content

Commit 5e25f71

Browse files
committed
fix: add producer signature and pubkey verification in P2P block sync
- Import Ed25519PublicKey for signature verification - Add address_from_pubkey helper - Implement _verify_block_signature and _verify_miner_pubkey_match - Call these in validate_block before accepting block This fixes critical consensus vulnerability where P2P sync accepted forged blocks without checking signatures or producer authorization. Fixes #2001 Bounty: Critical (100-150 RTC) Wallet: RTC3fcd93a4ec68cfd6b59d1b41c4872c5c239c4ad8
1 parent 27e8bd6 commit 5e25f71

74 files changed

Lines changed: 25764 additions & 25726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
name: Bounty Claim
2-
description: Claim an RTC bounty for your contribution
3-
title: "[Bounty Claim] "
4-
labels: [bounty-claim]
5-
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
## Claim an RTC Bounty
10-
Fill out this form after your PR is merged to receive your RTC payment.
11-
**Reference rate: 1 RTC = $0.10 USD**
12-
13-
- type: input
14-
id: pr-link
15-
attributes:
16-
label: Merged PR Link
17-
description: Link to your merged pull request
18-
placeholder: https://github.com/Scottcjn/Rustchain/pull/123
19-
validations:
20-
required: true
21-
22-
- type: input
23-
id: bounty-issue
24-
attributes:
25-
label: Bounty Issue Link
26-
description: Link to the bounty issue you completed
27-
placeholder: https://github.com/Scottcjn/rustchain-bounties/issues/123
28-
validations:
29-
required: true
30-
31-
- type: input
32-
id: wallet
33-
attributes:
34-
label: RTC Wallet Name
35-
description: Your RustChain wallet name (create one at rustchain.org/wallet.html)
36-
placeholder: my-wallet-name
37-
validations:
38-
required: true
39-
40-
- type: dropdown
41-
id: tier
42-
attributes:
43-
label: Bounty Tier
44-
options:
45-
- Micro (1-10 RTC)
46-
- Standard (20-50 RTC)
47-
- Major (75-100 RTC)
48-
- Critical (100-150 RTC)
49-
validations:
50-
required: true
51-
52-
- type: textarea
53-
id: summary
54-
attributes:
55-
label: What did you do?
56-
description: Brief summary of your contribution
57-
placeholder: Fixed the epoch settlement calculation for edge cases...
58-
validations:
59-
required: true
1+
name: Bounty Claim
2+
description: Claim an RTC bounty for your contribution
3+
title: "[Bounty Claim] "
4+
labels: [bounty-claim]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Claim an RTC Bounty
10+
Fill out this form after your PR is merged to receive your RTC payment.
11+
**Reference rate: 1 RTC = $0.10 USD**
12+
13+
- type: input
14+
id: pr-link
15+
attributes:
16+
label: Merged PR Link
17+
description: Link to your merged pull request
18+
placeholder: https://github.com/Scottcjn/Rustchain/pull/123
19+
validations:
20+
required: true
21+
22+
- type: input
23+
id: bounty-issue
24+
attributes:
25+
label: Bounty Issue Link
26+
description: Link to the bounty issue you completed
27+
placeholder: https://github.com/Scottcjn/rustchain-bounties/issues/123
28+
validations:
29+
required: true
30+
31+
- type: input
32+
id: wallet
33+
attributes:
34+
label: RTC Wallet Name
35+
description: Your RustChain wallet name (create one at rustchain.org/wallet.html)
36+
placeholder: my-wallet-name
37+
validations:
38+
required: true
39+
40+
- type: dropdown
41+
id: tier
42+
attributes:
43+
label: Bounty Tier
44+
options:
45+
- Micro (1-10 RTC)
46+
- Standard (20-50 RTC)
47+
- Major (75-100 RTC)
48+
- Critical (100-150 RTC)
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: summary
54+
attributes:
55+
label: What did you do?
56+
description: Brief summary of your contribution
57+
placeholder: Fixed the epoch settlement calculation for edge cases...
58+
validations:
59+
required: true
Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
name: Bug Report
2-
description: Report a bug in RustChain node, miner, or wallet
3-
title: "[Bug] "
4-
labels: [bug]
5-
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
## Report a Bug
10-
Thanks for helping improve RustChain! Bug fixes can earn RTC bounties.
11-
12-
- type: dropdown
13-
id: component
14-
attributes:
15-
label: Component
16-
options:
17-
- Node (rustchain_v2_integrated)
18-
- Miner (rustchain_*_miner)
19-
- Wallet (rustchain_wallet_*)
20-
- Consensus (RIP-200)
21-
- API Endpoint
22-
- Block Explorer
23-
- Documentation
24-
- Other
25-
validations:
26-
required: true
27-
28-
- type: textarea
29-
id: description
30-
attributes:
31-
label: What happened?
32-
description: Clear description of the bug
33-
placeholder: When I run the miner with --wallet flag, it crashes with...
34-
validations:
35-
required: true
36-
37-
- type: textarea
38-
id: expected
39-
attributes:
40-
label: Expected behavior
41-
description: What should have happened?
42-
validations:
43-
required: true
44-
45-
- type: textarea
46-
id: reproduce
47-
attributes:
48-
label: Steps to reproduce
49-
description: How can we reproduce this?
50-
placeholder: |
51-
1. Run `python3 rustchain_linux_miner.py --wallet test`
52-
2. Wait for attestation cycle
53-
3. See error in log
54-
validations:
55-
required: true
56-
57-
- type: input
58-
id: version
59-
attributes:
60-
label: Version / Commit
61-
description: Which version or commit hash?
62-
placeholder: v2.2.1-rip200 or commit abc1234
63-
64-
- type: dropdown
65-
id: os
66-
attributes:
67-
label: Operating System
68-
options:
69-
- Linux (x86_64)
70-
- Linux (ARM/aarch64)
71-
- Linux (PowerPC)
72-
- macOS (Apple Silicon)
73-
- macOS (Intel)
74-
- Windows
75-
- Other
76-
77-
- type: textarea
78-
id: logs
79-
attributes:
80-
label: Relevant logs
81-
description: Paste any error messages or logs
82-
render: shell
1+
name: Bug Report
2+
description: Report a bug in RustChain node, miner, or wallet
3+
title: "[Bug] "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Report a Bug
10+
Thanks for helping improve RustChain! Bug fixes can earn RTC bounties.
11+
12+
- type: dropdown
13+
id: component
14+
attributes:
15+
label: Component
16+
options:
17+
- Node (rustchain_v2_integrated)
18+
- Miner (rustchain_*_miner)
19+
- Wallet (rustchain_wallet_*)
20+
- Consensus (RIP-200)
21+
- API Endpoint
22+
- Block Explorer
23+
- Documentation
24+
- Other
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: description
30+
attributes:
31+
label: What happened?
32+
description: Clear description of the bug
33+
placeholder: When I run the miner with --wallet flag, it crashes with...
34+
validations:
35+
required: true
36+
37+
- type: textarea
38+
id: expected
39+
attributes:
40+
label: Expected behavior
41+
description: What should have happened?
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: reproduce
47+
attributes:
48+
label: Steps to reproduce
49+
description: How can we reproduce this?
50+
placeholder: |
51+
1. Run `python3 rustchain_linux_miner.py --wallet test`
52+
2. Wait for attestation cycle
53+
3. See error in log
54+
validations:
55+
required: true
56+
57+
- type: input
58+
id: version
59+
attributes:
60+
label: Version / Commit
61+
description: Which version or commit hash?
62+
placeholder: v2.2.1-rip200 or commit abc1234
63+
64+
- type: dropdown
65+
id: os
66+
attributes:
67+
label: Operating System
68+
options:
69+
- Linux (x86_64)
70+
- Linux (ARM/aarch64)
71+
- Linux (PowerPC)
72+
- macOS (Apple Silicon)
73+
- macOS (Intel)
74+
- Windows
75+
- Other
76+
77+
- type: textarea
78+
id: logs
79+
attributes:
80+
label: Relevant logs
81+
description: Paste any error messages or logs
82+
render: shell
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
name: Feature Request
2-
description: Suggest a new feature or improvement
3-
title: "[Feature] "
4-
labels: [enhancement]
5-
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
## Suggest a Feature
10-
Great ideas can become bounties! Feature implementations earn RTC.
11-
12-
- type: textarea
13-
id: problem
14-
attributes:
15-
label: Problem or motivation
16-
description: What problem does this solve?
17-
placeholder: Currently there's no way to...
18-
validations:
19-
required: true
20-
21-
- type: textarea
22-
id: solution
23-
attributes:
24-
label: Proposed solution
25-
description: How should this work?
26-
validations:
27-
required: true
28-
29-
- type: textarea
30-
id: alternatives
31-
attributes:
32-
label: Alternatives considered
33-
description: Other approaches you thought about
34-
35-
- type: dropdown
36-
id: scope
37-
attributes:
38-
label: Scope
39-
options:
40-
- Small (few hours)
41-
- Medium (1-2 days)
42-
- Large (week+)
43-
- Not sure
44-
45-
- type: checkboxes
46-
id: willing
47-
attributes:
48-
label: Contribution
49-
options:
50-
- label: I'd like to implement this myself (for RTC bounty)
51-
- label: I need help implementing this
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
title: "[Feature] "
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Suggest a Feature
10+
Great ideas can become bounties! Feature implementations earn RTC.
11+
12+
- type: textarea
13+
id: problem
14+
attributes:
15+
label: Problem or motivation
16+
description: What problem does this solve?
17+
placeholder: Currently there's no way to...
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: solution
23+
attributes:
24+
label: Proposed solution
25+
description: How should this work?
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives considered
33+
description: Other approaches you thought about
34+
35+
- type: dropdown
36+
id: scope
37+
attributes:
38+
label: Scope
39+
options:
40+
- Small (few hours)
41+
- Medium (1-2 days)
42+
- Large (week+)
43+
- Not sure
44+
45+
- type: checkboxes
46+
id: willing
47+
attributes:
48+
label: Contribution
49+
options:
50+
- label: I'd like to implement this myself (for RTC bounty)
51+
- label: I need help implementing this

0 commit comments

Comments
 (0)