NumFranc 如何在不設中央機構的情況下抵禦 51% 攻擊
Resisting 51% attacks without a central authority: what I tried in NumFranc
NumFranc 開發者嘗試以多項規則降低小型工作量證明加密貨幣網絡遭遇 51% 攻擊的風險,同時不設中央機構簽署「正確」鏈。節點會拒絕替換超過 10 個近期區塊,並延遲接納延後公開的秘密挖礦鏈;大額付款需 30 次確認,小額付款需 6 次,另設檢查點。開發者指出,這些規則是取捨而非安全證明,強大的攻擊者仍可能控制網絡。
I’m a young French developer building NumFranc, a cryptocurrency written in Rust (Argon2d proof of work, ML-DSA-87 signatures). I code with the help of an AI, so what I’m really looking for is human code review.
The problem. In a proof-of-work cryptocurrency, someone who controls more than half of the computing power can mine a chain in secret, then reveal it to replace the official one. This is the 51% attack. My network is small, so the risk is real.
What I refuse to do. I don’t want a central authority that signs the “right” chain. That would solve the problem, but it would no longer be a decentralized cryptocurrency.
What I put in place:
A reorganization limit: a node refuses to replace more than 10 recent blocks.
A penalty for hidden chains: a chain mined in secret and revealed late is delayed before being accepted, while honest competition is not.
Adaptive confirmations: a large payment needs 30 confirmations, a small one needs 6.
A few checkpoints in the code, which the node refuses to reorganize past.
The limits. A very powerful attacker could still try to take over, and my rules are trade-offs, not proofs. That’s why I’d love your criticism: where is the flaw?
The code is here: https://github.com/ShadowRook-crypto/NumFranc (see src/chain.rs).
Transparency: I wrote the code with help from an AI, as a way to learn how to develop software and to communicate in English. In the long term, I’d like NumFranc to become a real post-quantum payment network, built with a community. No NFR is sold and no value is promised.
來源:DEV Community · dev.to