Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlog for RC-2 milestone #94

Closed
ongrid opened this issue Oct 27, 2020 · 18 comments
Closed

Backlog for RC-2 milestone #94

ongrid opened this issue Oct 27, 2020 · 18 comments
Assignees
Milestone

Comments

@ongrid
Copy link
Contributor

ongrid commented Oct 27, 2020

The following table summarizes the list of DePool contracts, docs and test improvements for RC-2 release candidate. RC2 plans will be confirmed on the zoom call 28 Oct 2020.

Timing:
PRs are ready: 12 Nov 2020
RC-2 release: 19 Nov 2020

For RC-1 backlog see #77

Table maintained by @ongrid. Please feel free to drop your ideas in comments (for discussion) or create the issue with assigned RC-2 milestone if you are able to finally formalize the scope and provide the link to it.

Short Description and GH issue Where Type Milestone, status, assignee Details
reportEther2 RBAC #85 DePool, Oracle, stETH Unify RC-1 @ongrid @Klyaus DePool.sol:reportEther2 - use Aragon's approach with role modifier instead of require check
Insurance Vault #46 #33 DePool Impl RC-2 Implement insurance fund as a separate vault under DAO management.
Modular tests. Not relevant anymore. Decided to implement the tests in a linear fashion. tests: DePool, Oracle Tests RC-2 All tests should be combined in modular hierarchical setup structures (with it, contexts and fixtures established within beforeEach block). Printable context names shold clearly explain what happens from user or businness-logic perspective. Printable it-block names should explain what is expected in assert. Avoid mutate/assert/mutate/assert anti-pattern since they are too fragile and painful to maintain.
stake vs deposit. Not relevant anymore after initial grooming and updated oracle spec. DePool Unify RC-2 Eliminate intersections of stake and deposit words. deposit word is reserved for official contract and its function. In-DePool 32-Ether portions and its accounted states are stakes. Rename depositedEther to stakedEther
totalControlledEther to pooledEther. In the LIP-3 it's converted to getter and named getTotalPooledEth, to be implemented in v0.2.0 DePool Unify RC-2 Rename totalControlledEther to pooledEther - shorter and pronounced better
remoteEther2 to beaconEther. It's proposed in LIP-3, to be implemented in v0.2.0 DePool Unify RC-2 Rename remoteEther2 to beaconEther because remote term depends on the point of view, should be avoided in documentation. Also agreed before to use beacon instead of Ether2 as more specific term
reportBeaconBalance. It's proposed in LIP-3, to be implemented in v0.2.0 DePool, Oracle Impl RC-2 Replace existing functions reportEther2 and pushData to the unified form reportBeaconBalance(reportEpoch, beaconEther). Rename data to dataPoint (already used throughout the code and looks good). Add require checks: isEpochReportable (is the epoch number allowed to report, or in other words, does it divide by EPOCHS_PER_REPORT without remainder) and isEpochEligible (timing checks, isn't it in the future or in the too distant past)
member getters #119 Oracle Cosmetic RC-2 Change member-related getters to more ideomatic: findMember to _getMemberID, getOracleMembers to getMembers
ppm instead of base points #120 Oracle, DePool Impl RC-2 Relative numbers are accounted in Parts-per_notation. Since the most popular per cent unit doesn't give enough granularity, the next widely adopted ppm or parts-per-million unit can be used.
maxBalanceChange per epoch. Should be discussed in a separate lip-4 Oracle Impl RC-2 Protect the system from synchronous oracle misbehavior by limiting the maximum allowed balance change per epoch. Should have corresponding setters and management role for fine-tuning.
Epoch-related math and timing. The epoch-bount math proposed in LIP-3, to be implemented in v0.2.0. Ideas on validation and protection should be discussed in a separate LIP#4 Oracle Impl RC-2 Oracle implementation and lifecycle management can be significantly simplified if we use a single chackpoint identifier throughout the entire system - reportEpoch and make Oracle contract the single point of daemon's configuration and source of the timing. The oracle daemon can run in endless loop and poll the Oracle's getOpenReportEpoch on each iteration. It returns the last epoch id, that is open to receive reports. Then oracle daemon should check if it's already transacted reportBeaconBalance with given reportEpoch or not. If not, the oracle retrieves the balances for the given reportEpoch, summarizes them, then initiates and expedites transaction. Rename _getCurrentReportInterval->getCurrentReportableEpoch, getReportIntervalDurationSeconds->getEpochsPerReport to unify. Remove _getReportIntervalForTimestamp - it's not used. Affects E2E tests.
Bad naming: final, tryFinalize. Proposed in LIP-3 (called lido_contract.ReportBeacon), to be implemented in v0.2.0 Oracle Cosmetic RC-2 Reason: to avoid confusions with in-oracle ETH2 finality terms like finalizedEpoch. Without separation we are in confusing situation when finalized epoch in Oracle daemon is not finalized in the contract. So rename _tryFinalize to more specific tryReportToDePool.
Bad naming: "Aggregated" #119 Oracle Cosmetic RC-2 In currentlyAggregatedReportInterval and currentlyAggregatedData "Aggregated" adjective sounds confusing - data doesn't aggregate, staying intact, just temporarily cached and voted. Should change to openForReporting or something shorter like that.
Rename DePool to Lido #52 Oracle, DePool, docs and tests Cosmetic RC-2
Deposit store gas optimizations #53 #109 #82 DePool Impl RC-2
Oracle gas optimizations. Proposed in LIP-3 (tight packing), to be implemented in v0.2.0 Oracle Impl RC-2
E2E tests in RC-2 DONE E2E Tests RC-2, Vlad? Need to specify the scope of test-cases. Note from @ongrid : implementation of new oracles behavior and new Oracle interface will introduce breaking changes between RC's.
@ongrid ongrid added this to the RC2 milestone Oct 27, 2020
@ongrid ongrid self-assigned this Oct 27, 2020
@ongrid ongrid pinned this issue Oct 27, 2020
@vshvsh
Copy link
Contributor

vshvsh commented Oct 28, 2020

IMO

Important

  • rename to Lido
  • Gas profiling for DAO deployment
  • Get DAO deployment under 80%. of block limit
  • cosmetic things, general improvements, refactoring

Nice to haves

  • E2E tests

Out of scope (RC3 material)

  • Gas optimizations

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

stETH and cstETH: ecosystem compatibility with top DeFi dApps.

All aspects should investigated including UI nuances and behavior. The most interesting - allowance process when slashing happens. Result: compatibility matrix + field notes.

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

WIP: Oracle daemon: improved reporting protocol

  1. Propose updated reporting algorithm
  2. Implement it (Will break compatibility, E2E adaptation required).

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

Node-less (light) oracle daemon

Oracle daemon can use public endpoints instead of running own beacon and ETH1 nodes. Needs adaptation to Infura's throttling and limits, caching, absence of some API methods like web3.pool.

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

Big test run on Goerly + Medalla #35

  • 50 staking providers
  • 1000 validator keys
  • 32000 goETH

Need to prepare testplan.
Will need some housekeeping and automation scripts, manual assistance.
Contracts will become visible outside

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

Automated testing (CI)

Travis?

  1. contracts unit tests
  2. oracle daemon unit tests
  3. coverage (contracts, oracle daemon)
  4. E2E (nightly?)

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

Oracle Daemon visibility

For run-time visibility the oracle should have some king of minimal RESTful API. In the future it can be used by SPA/Electron UI or CLI.

Getters:

  • get config
  • get last reports
  • get oracle-initiated transactions
  • debugging data collection issues
  • getting member's ETH balance
  • logs retrieval
  • some other relevant stuff

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

  • decide on licenses LICENSE.md + compliance with SPDX-License-ID tags (in repos and Solidity files)

@ongrid
Copy link
Contributor Author

ongrid commented Oct 28, 2020

  • cstETH burning (remaining stETH won't be able to claim back then). Decide on proper behavior. One of the simplest solutions - remove burn method.

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

WIP: Oracle daemon: improved reporting protocol

  1. Propose updated reporting algorithm
  2. Implement it (Will break compatibility, E2E adaptation required).

Partially done:
LIP-3 and issue LIP#4 (pending)

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

Big test run on Goerly + Medalla #35

  • 50 staking providers
  • 1000 validator keys
  • 32000 goETH

Need to prepare testplan.
Will need some housekeeping and automation scripts, manual assistance.
Contracts will become visible outside

Done, results (jupyter notebooks) are in https://github.com/lidofinance/ad-hoc-experiments

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

Oracle Daemon visibility

For run-time visibility the oracle should have some king of minimal RESTful API. In the future it can be used by SPA/Electron UI or CLI.

Getters:

  • get config
  • get last reports
  • get oracle-initiated transactions
  • debugging data collection issues
  • getting member's ETH balance
  • logs retrieval
  • some other relevant stuff

Discussed on one of the calls. Desided to just introduce graphana/prometheus support and keep daemon primitive. https://github.com/lidofinance/lido-dao/projects/1#card-48707294

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

  • cstETH burning (remaining stETH won't be able to claim back then). Decide on proper behavior. One of the simplest solutions - remove burn method.

Discussed this effect with @vshvsh, this behavior is expected. Wontfix

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

  • decide on licenses LICENSE.md + compliance with SPDX-License-ID tags (in repos and Solidity files)

#121

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

Automated testing (CI)

Travis?

  1. contracts unit tests
  2. oracle daemon unit tests
  3. coverage (contracts, oracle daemon)
  4. E2E (nightly?)

@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

stETH and cstETH: ecosystem compatibility with top DeFi dApps.

All aspects should investigated including UI nuances and behavior. The most interesting - allowance process when slashing happens. Result: compatibility matrix + field notes.

#122

@ongrid ongrid unpinned this issue Nov 10, 2020
@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

This issue has been splitted to separate issues and can be closed.

@ongrid ongrid changed the title WIP: Backlog for RC-2 milestone Backlog for RC-2 milestone Nov 10, 2020
@ongrid
Copy link
Contributor Author

ongrid commented Nov 10, 2020

Statuses are tracked in the Releases project.

@ongrid ongrid closed this as completed Nov 10, 2020
tamtamchik added a commit that referenced this issue Sep 30, 2024
chore: try to use latest foundry build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants