-
Notifications
You must be signed in to change notification settings - Fork 81
Sputnik Factory V2 Upgrade Action Plan
The Sputnik DAO codebase is ready to start rolling out upgrades & new features to allow DAOs to continue innovating. This is a step in the direction of continuous deployment of new features the community needs. This is the first phase of upgrades that will be rolled out over the coming months.
No. At current time of writing, this upgrade only applies to Sputnik v2 factory & governance contracts.
The following groups will need to self-identify & read pertinent information, action items & next steps:
-
Factory Owners:
- You are a factory owner if you hold keys to any of the following accounts: ['sputnik-dao.near','sputnikdao.near','sputnikv2.testnet','sputnik-2.testnet']
- You are a factory owner if you have ever deployed the file
sputnikdao_factory2.wasm
to testnet or mainnet.
- Client Owners:
-
DAO Owners:
- You are a DAO owner if you have a governing vote within a deployed sputnik-dao contract instance. You will know by checking the DAO address is a sub-account of
sputnik-dao.near
, examplesome_dao.sputnik-dao.near
.
- You are a DAO owner if you have a governing vote within a deployed sputnik-dao contract instance. You will know by checking the DAO address is a sub-account of
-
Near Community
- Anyone that believes in DAOs and is a NEAR hodler :)
You will be responsible for:
- Deploying new factory code to factory contracts
- Testing deployed factory code with sample scripts
- Follow guidance & testing process for each network: testnet, mainnet
You will be responsible for:
- Preparing web interfaces for upcoming upgrade support
- Assisting DAO owners understand when they can upgrade
- Creating a web experience helping DAO owners propose upgrades
- Creating a web experience for displaying versioning information based on new factory standards
You will be responsible for:
- Waiting patiently until DAO upgrades are available
- Doing research & understanding each upcoming upgrades requirements & data migrations
- Proposing that your DAO does an upgrade (including potential data migrations in the future)
- Confirming all DAO functionality works post-upgrade
NOTE: This first upgrade for your DAO will not require a data migration. This is just a reference to help you understand that future upgrades may require some data migrations before your DAO can continue using new upgrades & features.
As a community member you will help assist in a positive influence in helping others come along-side to support the upgrade process. You will help answer any questions & concerns other community members have while this upgrade process happens.
The upgrade process will require a very rigid procedure order:
- Codebase Updates [Sputnik Dev Team]
- Security Audit [External Audit Team]
- Client Preparedness [Client Owners]
- Factory Deployment [Factory Owners]
- Factory Testing & QA [Factory Owners], [Sputnik Dev Team]
- Factory Cooloff [Factory Owners], [Sputnik Dev Team]
- Governance Contract Deployment (AKA DAO V3) [Factory Owners]
- Governance Contract Testing & QA [Sputnik Dev Team]
- DAO Upgrade Proposals Testing [Sputnik Dev Team]
- DAO Upgrade Proposal Client Integration Rollout [Client Owners]
- DAO Upgrade Proposal Approval & Deployment [Client Owners], [DAO Owners]
NOTE: Each owner has been tagged for quick reference of responsibilities in order.
A. Develop Code for Factory Contract
Update the factory contract code to support version based code stored in blobs. Each stored instance of code should apply the approved standards for upgrading contracts. The factory will be used as a registry of versioned DAO code.
B. Documentation
Create documentation on the deployment + testing flow for new factory changes.
A. Reference Documentation
View all documentation available for currently deployed code, core codebase, local/testnet deployment practices & the new upgrade flow documentation.
Audit docs list
B. Results Submission
Upon audit completion, results should be submitted directly to the core development team to review. All audit results should be considered confidencial until any/all mitigation steps have been completed. In the interest of transparency, all audit items will be posted upon mitigation in the "Audit Guidance" section below.
Version Interface Support
Upon standards acceptance of the new Factory versioning data, all clients should be ready to integrate a way for DAO users to know which version their DAO contract code is.
There will only be 2 versions available to begin once the factory is upgrades. The following code snippet shows the data sample:
[
[
"FBSVNx98eQMFaNfu686bVqpaBCCw7iPRL9Pn3EbYrLPk",
{ "version": "v3", "commit_id": "no data", "changelog_url": null }
],
[
"ZGdM2TFdQpcXrxPxvq25514EViyi9xBSboetDiB3Uiq",
{
"version": "v2",
"commit_id": "c2cf1553b070d04eed8f659571440b27d398c588",
"changelog_url": null
}
]
]
This can be retrieved using the following command (once the factory has been deployed)
NEAR_ENV=mainnet near view sputnik-dao.near get_contracts_metadata
NOTE: This could change, please connect with development team prior to implementation! NOTE: The response payload will also contain different data depending on the current step in the upgrade process.
A. Deployment checklist
- Create 1 or 2 demo DAOs that can be upgraded upon factory upgrade
- Compile Latest Factory
- Deploy Factory to:
sputnikv2.testnet
- Check that factory basic methods are fine
- Get a current DAO source code & store as
.wasm
file - Submit source code as a new stored version in factory
- Submit metadata recording the version, code_hash & commit_id
B. Tests & Confirmation checklist
- Confirm 2 versions exist in factory
- Confirm list of DAOs
- Confirm factory can create a new DAO
- Check basics factory methods
A. Deployment checklist
- Create 1 or 2 demo DAOs that can be upgraded upon factory upgrade
- Compile Latest Factory
- Deploy Factory to:
sputnik-dao.near
- Check that factory basic methods are fine
- Get a current DAO source code & store as
.wasm
file - Submit source code as a new stored version in factory
- Submit metadata recording the version, code_hash & commit_id
B. Tests & Confirmation checklist
- Confirm 2 versions exist in factory
- Confirm list of DAOs
- Confirm factory can create a new DAO
- Check basics factory methods
2 Week Period of Mainnet Testing
Using a cooloff window for testing in mainnet without rolling out upgrades to DAO contracts will help mitigate any exploits or data corruption pre-maturely. It will help ensure all stakeholders are in lock-step approving next phase of upgrades safely.
The 2 week clock will begin once the V3 Factory has been deployed to mainnet.
Testnet Checklist
- Compile Latest Sputnik2
- Deploy Sputnik2
.wasm
file to Factory:sputnikv2.near
- Submit metadata recording the version, code_hash & commit_id
- Confirm the new version exists in factory, v3 with commit id
596f27a649c5df3310e945a37a41a957492c0322
and hashGUMFKZP6kdLgy3NjKy1EAkn77AfZFLKkj96VAgjmHXeS
- Confirm factory can create a new DAO
- Check basics DAO methods, add member, payout proposal, etc.
Mainnet Checklist
- Compile Latest Sputnik2
- Deploy Sputnik2
.wasm
file to Factory:sputnik-dao.near
- Submit metadata recording the version, code_hash & commit_id
- Confirm the new version exists in factory, v3 with commit id
596f27a649c5df3310e945a37a41a957492c0322
and hashGUMFKZP6kdLgy3NjKy1EAkn77AfZFLKkj96VAgjmHXeS
- Confirm factory can create a new v3 DAO
Mainnet Test V3 Checklist
NOTE: This is the list of all features for happy path. These tests will confirm all functionality of a DAO are in working order. This does not test upgrade, as that will happen in next step.
- Check basic DAO view methods
- Add member
- Payout proposal, etc.
A. Mainnet Demo DAO Upgrade Flow Test
- Using a Demo DAO, create an "UpgradeSelf" proposal that uses v3 code hash
- Majority of council will need to approve the upgrade proposal
- Once the proposal is approved, check that there wasn't a failed transaction
B. Mainnet Demo DAO Tests & QA (Post-Upgrade)
NOTE: List of all features needed to test successful upgrade from v2 to v3. Does not cover **all** cases, but focusses on backward compatibility checks.
- Create DAO with default policy
- Add Member to council
- Remove Member to council
- Approve Proposal
- Reject Proposal
- Remove Proposal
- Update Policy - ChangePolicy
- Submit Payout (Transfer NEAR) proposal
- Submit Payout (Transfer Fungible Token) proposal
- Submit FunctionCall proposal
- Submit SetStakingContract proposal
- Submit AddBounty proposal
- Submit BountyDone proposal
Client DAO Owner Upgrade UI/UX
All clients (Astro, Sputnik v2) UI needs a helpful upgrade flow with messaging to help DAO council to create an upgrade proposal. This should consist of 3 pieces:
- A notice to the DAO if there is an available upgrade, with a link to creating an upgrade proposal
- A UI for creating the upgrade proposal
- A success message if the upgrade proposal was sent, or had an error of some kind
Client Messaging Samples
Here are some sample messages that can be used in client UI:
For recent version releases:
Title: "An Upgrade Is Available For Your DAO"
Description: "Click the Propose Upgrade button to start the upgrade process. Once your DAO has approved the proposal, your DAO will get immediately upgraded."
For DAOs that do not upgrade for a while:
Title: "Your DAO is out of date, please upgrade!"
Description: "Your DAO can be upgraded to the latest version, please click Propose Upgrade to get started. Upon approval, your DAO will have the latest version and support all new features."
Gov Forum & Blog Post
Gov.near.org Forum Post
Sputnik core team will create a post announcing this upgrade process, and how each DAO will be able to upgrade to the latest DAO code. This post will give a little background about what the changes will be, the action steps a DAO council will need to take and a roadmap for future upgrade process.
Blog Post
Sputnik core team & Near Foundation will collaborate on a blog post announcing the DAO upgrades, to help the greater community awareness on this innovative step. This post will help address issues & concerns pertaining to the greater community. It will also list how general public can help get involved and start a new V3 DAO.
For DAO Council Members
If you are a DAO member with the ability to submit new proposals, specifically "UpgradeSelf" proposals, this guide is for you. Note, these steps may change, however it will give you an idea of how to proceed.
- Go to Astro and go to your DAO.
- Find the settings page of your DAO, and look for info about the DAO version.
- If your DAO shows the version "v2", you need an upgrade!
- Find a button for "Upgrade DAO", OR submit an "UpgradeSelf" proposal.
For DAO Community
If you are a DAO community member that doesn't have the ability to submit proposals but notice that your DAO needs an upgrade, here's a few ways you can help get the DAO upgraded:
- Send a message to your DAO council members, alerting them the upgrade is available.
- Submit a poll to your DAO to check if the community agrees the upgrade should happen.
- Confirm that your DAO is capable of upgrading (Make sure it is v2, not v1). You will know it cannot be upgraded if your DAO has an account with
.sputnikdao.near
.
TBD (If you have a question/concern, submit a comment)
TBD upon audit completion
- V2 sputnik-dao.near: 8RMeZ5cXDap6TENxaJKtigRYf3n139iHmTRe8ZUNey6N
- V1 sputnikdao.near: 8FP33Hcqq2kbxGWDbgrhQvEfgPv8rLzEDUMKC8mRncno
- V2 sputnikv2.testnet: ZGdM2TFdQpcXrxPxvq25514EViyi9xBSboetDiB3Uiq
- V1 sputnik-v1.testnet: 69kGmjgaQXqoEREqeYUCGsDeu6gti4B9sQVUJc1a96yb
- V0 sputnik-2.testnet: HgcSLMDMytDRunBw6nikAS8P47MBcRBAVbGa5CNExiSD
Factory:
- the factory code can be found inside
sputnikdao-factory/src
- the factory code is deployed on mainnet on
sputnikdao.near
account - the factory code was deployed on mainnet for the first time on January 11, 2021 at 2:29:30pm and the second time on January 20, 2021 at 1:31:05pm
- the factory code is deployed on testnet on
sputnik-v1.testnet
account
DAOs:
- the DAOs code can be found inside
sputnikdao/src
- the DAO code is deployed to several accounts that have the following format:
<dao_name>.sputnikdao.near
for mainnet and<dao_name>.sputnik-v1.testnet
for testnet - see all the DAOs that live on mainnet by calling
near view sputnikdao.near get_dao_list
- see all the DAOs that live on testnet by calling
near view sputnik-v1.testnet get_dao_list
Factory:
- the factory code can be found inside
sputnikdao-factory2/src
- the factory code is deployed on mainnet on
sputnik-dao.near
account - the factory code was deployed only once on mainnet on June 01, 2021 at 6:17:46pm
- the factory code is deployed on testnet on
sputnikv2.testnet
account
DAOs:
- the DAOs code can be found inside
sputnikdao2/src
- the DAO code is deployed to several accounts that have the following format:
<dao_name>.sputnik-dao.near
for mainnet and<dao_name>.sputnikv2.testnet
for testnet - see all the DAOs that live on mainnet by calling
near view sputnik-dao.near get_dao_list
- see all the DAOs that live on testnet by calling
near view sputnik-v1.testnet get_dao_list
- https://old.sputnik.fund/ -> it uses V1 smart contracts
- https://www.sputnik.fund/ -> it uses V1 smart contracts
- https://v2.sputnik.fund/ -> it uses v2 smart contracts
- https://astrodao.com/ -> it uses v2 smart contracts