Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Update design to Factory/Vendor #43

Merged
merged 35 commits into from
Jul 25, 2019
Merged

Update design to Factory/Vendor #43

merged 35 commits into from
Jul 25, 2019

Conversation

nkuba
Copy link
Member

@nkuba nkuba commented Jul 16, 2019

Updated architecture to reflect proposal from RFC 12.

Introduced vendor contract to hold references to the factory.
Updated keep registry to hold references to vendors for given keep types.

Closes #41

nkuba added 10 commits July 16, 2019 13:29
Introduced Keep Vendor contract according to Keep RFC 12.

A vendor is a smart contract with which the application interacts to
obtain the new instance of a keep of the given type backed by enough
stakers so that all operations on the created keep can go smoothly.
Vendor interacts with keep factories choosing the one most recent if
it is backed by enough stakers. Each vendor is a service contract
and does not have to be sanctioned by stakers. Each vendor can
operate on several versions of keep factory to allow for a smooth
upgrade process.
Implemented Keep Registry contract according to Keep RFC 12

The keep registry serves the role of the master list and tracks
sanctioned staking contracts, operator contracts (including keep
factories) and vendors. It ensures that only approved contracts
are used. A new type of keep can be added without upgradeable registry.
Truffle is catching unexpected errors in test so no need to declare
catches for functions execution.
solidity/contracts/KeepRegistry.sol Outdated Show resolved Hide resolved
solidity/contracts/KeepRegistry.sol Outdated Show resolved Hide resolved
solidity/migrations/2_deploy_contracts.js Outdated Show resolved Hide resolved
solidity/migrations/2_deploy_contracts.js Outdated Show resolved Hide resolved
solidity/migrations/2_deploy_contracts.js Outdated Show resolved Hide resolved
solidity/contracts/ECDSAKeepVendor.sol Show resolved Hide resolved
@nkuba
Copy link
Member Author

nkuba commented Jul 18, 2019

@liamzebedee ready for a next round.

solidity/test/ECDSAKeepVendorTest.js Outdated Show resolved Hide resolved
solidity/test/KeepRegistryTest.js Show resolved Hide resolved
@nkuba nkuba requested review from liamzebedee and pdyraga July 22, 2019 15:10
Copy link
Member

@pdyraga pdyraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I'd like to request a rename:

  • ECDSAKeepVendor -> TECDSAKeepVendor
  • ECDSAKeepFactory -> TECDSAKeepFactory

solidity/contracts/ECDSAKeepFactory.sol Outdated Show resolved Hide resolved
solidity/contracts/ECDSAKeepVendor.sol Show resolved Hide resolved
solidity/contracts/ECDSAKeepVendor.sol Outdated Show resolved Hide resolved
solidity/contracts/KeepRegistry.sol Outdated Show resolved Hide resolved
solidity/contracts/KeepRegistry.sol Show resolved Hide resolved
solidity/contracts/utils/AddressArrayUtils.sol Outdated Show resolved Hide resolved
solidity/test/ECDSAKeepVendorTest.js Outdated Show resolved Hide resolved
solidity/test/KeepRegistryTest.js Outdated Show resolved Hide resolved
solidity/test/KeepRegistryTest.js Outdated Show resolved Hide resolved
solidity/test/ECDSAKeepVendorTest.js Outdated Show resolved Hide resolved
solidity/migrations/2_deploy_contracts.js Outdated Show resolved Hide resolved
solidity/migrations/2_deploy_contracts.js Outdated Show resolved Hide resolved
solidity/contracts/utils/AddressArrayUtils.sol Outdated Show resolved Hide resolved
Copy link
Member

@mhluongo mhluongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick thought on naming

README.md Outdated Show resolved Hide resolved
@pdyraga
Copy link
Member

pdyraga commented Jul 24, 2019

@liamzebedee Can you please take a look if you are happy with the changes here and approve if you are?

We'll need to coordinate this change with tbtc so I would like to have a green light from everyone and wait for tbtc to be ready for this merge.

@pdyraga pdyraga dismissed liamzebedee’s stale review July 25, 2019 10:00

Liam is not able to provide review here ATM, all this comments were addressed as requested so I am dismissing this review.

@pdyraga pdyraga merged commit 4f923ea into master Jul 25, 2019
@pdyraga pdyraga deleted the vendor branch July 25, 2019 10:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update design to Factory/Vendor proposed in Keep RFC12
4 participants