algorand / go-algorand

Algorand's official implementation in Go.
https://developer.algorand.org/
Other
1.35k stars 468 forks source link

Measure consensus Nakamoto coefficient #5905

Open alfredonodo opened 8 months ago

alfredonodo commented 8 months ago

Hi, an independent open source third party project, nakaflow, compares all major blockchains in terms of Nakamoto coefficient, which is the measure of the smallest number of independent entities that can act collectively to block the consensus of a blockchain. It would be very interesting to add Algorand, unfortunately I do not have sufficient expertise to do it. Thank you

alfredonodo commented 7 months ago

Hi, I received this message via email, but it was then deleted from github:

Calculating NC for Algorand mainnet is tricky as we might not know all the cliques - but this is probably also true everywhere. Also Algorand is PPoS not PoS so the cutoff should in theory be 21% stake not 1/3rd stake.

2024 is going to see huge decentralization boost where mainnet no longer depends on sponsored relays and where staking incentives kick in, resulting in better stake distribution.

At the moment Algorand Foundation runs a lot of the stake, but we can simulate what NC could be without AF.

NC(PoS) = 19 , NC(PPoS) = 8.

So are you confirming that algorand PPoS consensus algorithm tolerates a lower threshold a malicious nodes of 20% as specified here h assumed fraction of honest weighted users? If so, they have increased the safety threshold and decrease the liveness threshold compared to a classical BFT style PoS algorithm. Finally, the first number that you reported NC(PoS)~20 is the same number I found during my research, before reading about the higher threshold. Can anyone help me by adding the algorithm to the nakaflow project? Thank you

urtho commented 7 months ago

Hi, yes Algorand has lower threshold and stales if more than 20% of stake does not vote properly.

I removed the post because of a bug - I removed the Foundation too late in the pipeline. After correction the first three accounts hold 27.17% stake - so NC is 3 atm (without Algorand Foundation)

https://allo.info will have the API you need to get NC value but that is part of the project that will probably only launch late in Q2.

image

alfredonodo commented 7 months ago

Thank you, so it is not possible to get this data from here? I usually have a look here, but it has been closed. Is there any reliable source in the meantime to get the top-accounts, top-validators?

urtho commented 7 months ago

Upcoming reporting component of https://allo.info will be the new source . Until that happens feel free to use Allo's analytics API:

Current participation stats: https://analytics-api.allo.info/v1/api-docs/#get-/v1/stats/participation

Top 1000 accounts: https://analytics-api.allo.info/v1/api-docs/#get-/v1/stats/account/topalgo

The TOP1000 API has voting flag that tells you if the account is registered for participation in voting.

urtho commented 7 months ago

https://tps.nodely.io under Accounts charts show top 10 from this API.