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
Staking precompiles and caller lib #77
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 174102.9244 ONE (30009.08 USD @ $0.17/ONE) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 264 years, 10 months from now. 1) ndionxerz99 has started work. Saya akan melakukan apa saja untuk memikki tiket What is the minimum amount of staking? great idea, I'll take care of it. Please refer to the following PR to see my proposed implementation harmony-one/harmony#3906; the smart contract implementation is available at https://github.com/MaxMustermann2/harmony-staking-precompiles I want to work on this project, I am developer working towards building web3 programs Learn more on the Gitcoin Issue Details page. |
Create write capable precompiles that can perform staking transactions Add hard fork logic (EpochTBD) for these precompiles Tests for new code with at least 80% unit test coverage Staking library + tests in MaxMustermann2/harmony-staking-precompiles
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 174102.9244 ONE (42901.40 USD @ $0.26/ONE) has been submitted by:
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 174102.9244 ONE (50313.48 USD @ $0.31/ONE) has been submitted by: @LeoHChen please take a look at the submitted work:
|
1. Description
Currently, Harmony staking transactions are executed in a different logic other than the normal transaction. User can either send a normal transaction to do transfer or EVM call, or do staking transaction. This approach has restricted the use of staking protocol, and some DeFi products, E.g. liquidity staking, does not have access to the staking assets in consensus.
To improve the composability of the staking, we want to add the staking functions to the precompiles, so that the staking can be called from smart contract.
For this bounty, the features to be implemented includes:
2. Some background and instructions
2.1 Staking transaction logic
When leader propose blocks (
node/worker/worker.go:164
) and node insert chain (core/blockchain.go:1451
), the staking transactions will follow the logic atApplyStakingTransaction
(core/state_processor.go:112
) to execute the staking transaction.Staking transaction it has its own data structure where the staking directive type and data is inlcuded�:
One of this bounty's requirements is to add the staking processing logic to the precompiles (
core/vm/contracts.go:101
) and return the result as necessary.2.2 Fork logic
It is also needed to add a hard fork logic for adding new precompiles.
If you need more instruction, please add me on Discord
Jacky | Harmony#9576
for further discussion3. Features and acceptance criteria
3.1 Core protocol
ApplyStakingTransaction
.run
andCall
.LocalnetChainConfig
.3.2 Smart contract
3.3 Test reports
All test reports shall contain several test cases that include:
The tests can be run manually. Another bounty can be added later to integrate the test cases to
harmony-test
repository.3.4 Notice
The contracts and code changes are subject to code security audition, and developer may need to do some technically support even after the bounty closes.
4. Reward
$30,000 ONE
The text was updated successfully, but these errors were encountered: