Skip to content

Commit

Permalink
Committee selection in precompiled contract (autonity#921)
Browse files Browse the repository at this point in the history
* moved hardcoded address to one place

* generated bindings

* updated hardcoded addresses

* bindings

* generated bindings

* optimzed memory and runtime in sorting, added test

* generated bindings

* benchmark to compare current function with optimized one, added test for new sorting

* more optimization

* updated test

* do first call before benchmarking

* wip

* wip

* youssef tariq pair work

experimentation with precompiles

Signed-off-by: Youssef Azzaoui <[email protected]>

* bug fix

* iterative sorting

* test

* tests

* wip

* allow concurrent read from DB

* precompiled contract for computeCommittee

* contract updated, helper methods for tests

* tests

* bindings

* removed unnecessary changes

* test update

* mock committee selector precompiled

* test fix

* bindings

* fixed bug

* added test

* bindings

* lint fix

* fixed bug

* lint fix

* bug fix

* support for concurrent read

* removed concurrent read from secure trie

* fixed bug

* minor improv

* Compute committee precompiled2 (autonity#929)

* suggestions

Signed-off-by: yazzaoui <[email protected]>

* migrate vars

* calculate voters and enodes

* bindings

* constants and readability in precompiled

* fix test

---------

Signed-off-by: yazzaoui <[email protected]>
Co-authored-by: yazzaoui <[email protected]>

* moved to precompiled

* bindings

* lint fix

* update mock

* lock

* removed concurrency

* fixed bug

* bug fix

* bug fix

* fix test

* bindings

* use library sorting function

* increase timeout

* bindings

* fixed mock

* test mode in config

* ignore auth check in testmode

* bindings

* fix mock, update precompile

* fix test

* fixed test

* Update autonity/solidity/test/autonity.js

Co-authored-by: lorenzo <[email protected]>

* fixed bug

* test update

* fixed bug

* bindings

---------

Signed-off-by: Youssef Azzaoui <[email protected]>
Signed-off-by: yazzaoui <[email protected]>
Co-authored-by: Youssef Azzaoui <[email protected]>
Co-authored-by: lorenzo <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2024
1 parent e013bfa commit eafb334
Show file tree
Hide file tree
Showing 29 changed files with 975 additions and 245 deletions.
14 changes: 7 additions & 7 deletions autonity/autonity.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import (
)

var (
DeployerAddress = common.Address{}
AutonityContractAddress = crypto.CreateAddress(DeployerAddress, 0)
AccountabilityContractAddress = crypto.CreateAddress(DeployerAddress, 1)
OracleContractAddress = crypto.CreateAddress(DeployerAddress, 2)
ACUContractAddress = crypto.CreateAddress(DeployerAddress, 3)
SupplyControlContractAddress = crypto.CreateAddress(DeployerAddress, 4)
StabilizationContractAddress = crypto.CreateAddress(DeployerAddress, 5)
DeployerAddress = params.DeployerAddress
AutonityContractAddress = params.AutonityContractAddress
AccountabilityContractAddress = params.AccountabilityContractAddress
OracleContractAddress = params.OracleContractAddress
ACUContractAddress = params.ACUContractAddress
SupplyControlContractAddress = params.SupplyControlContractAddress
StabilizationContractAddress = params.StabilizationContractAddress
AutonityABIKey = []byte("ABISPEC")
)

Expand Down
Loading

0 comments on commit eafb334

Please sign in to comment.