poanetwork / poa-network-consensus-contracts

Main repository for POADAO consensus. Includes contracts for Initial Ceremony, Governance, Management of Validators
GNU General Public License v3.0
68 stars 64 forks source link

(Question) Are the deployed contracts versioned? #189

Closed afck closed 6 years ago

afck commented 6 years ago

I'm trying to make poa-ballot-stats handle multiple contract versions, since it needs to be able to evaluate the network's full history, across all hard forks and contract updates.

Are there any official version numbers or identifiers to refer to the different contracts that were deployed in sokol and core? What's the best way to find out what was deployed when in both networks? Does that correspond exactly to the commits in poa-chain-spec's sokol and core branches whose commit message contains the words "hard fork"?

varasev commented 6 years ago

Yes, you could find and use all the versions of contracts (their addresses and ABIs) in poa-chain-spec repo.

For now, we have four versions in Sokol: https://github.com/poanetwork/poa-chain-spec/blob/sokol/spec.json#L12-L23

The addresses and ABIs of all consensus contracts are stored in poa-chain-spec's commit history.

I think it's better to find corresponding PRs here: https://github.com/poanetwork/poa-chain-spec/pulls

The dates of HFs from Wiki may be helpful: https://github.com/poanetwork/wiki/wiki

image

varasev commented 6 years ago

The exact tree for deployed smart contracts in today's HF for Sokol: https://github.com/poanetwork/poa-network-consensus-contracts/tree/6c2c7798394ed14abcfb53fe9ce6269cd83630ff

afck commented 6 years ago

Perfect, thank you for the quick reply!