-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds rate setter in data flow (#1557)
* feat: Move scheduler after booker and disable orderer * adjust flow * refactor: Update parentsMap right after MessageOrdererd event * fix: Disable wait group in fifoscheduler * feat: Remove FIFO-scheduler * feat: Add Error event in scheduler * feat: Increase scheduler rate if node's not synced at start * fix: Await messages get scheduled in unit test * fix TestOpinionFormer_Scenario2 test * feat: Move TipManager after Orderer * refactor: Remove unused chan in tangle.go * fix: Avoid logging logged errors in scheduler * fix: Attach tip manager to OpinionFormed event * fix: Adjust unit test component setup wrt the scheduler moving * feat: Make booking running in a single go-routine * fix: Await all messages to be booked in the booker * plug in ratesetter * add rate setter to info API * refactor: rename MessageRated event * dummy rate setter estimate * slow down spammer * refactor ratesetter.estimate * add estimate to info endpoint * fix rate setter initial rate * Add estimate to dashboard * fix goimports * update dashboard * refactor * add estimate to /data * revert to use message instead of payload * pkger * fixes compilation errors * update pkged * Make rate setter work, adapt parameters. * Add rate setter metrics to Grafana. * Update dashboard. * Add ratesetter info endpoint and other updates. * Fix unit tests. * Disable rate setter in integration tests. * Fix integration tests * Change type of variable of rounds to skip * Change type of variable of rounds to skip * Disable ratesetter webapi endpoint in entrynode * Fix negative deficit issue * Merge develop to feat/rate-setter * Merge develop to feat/rate-setter * Fix stuff * Remove println * Fix feature network and print * Add paramater to enable debugger * Update dashboard * Fix negative deficit problem * Update evil wallet and cli wallet to use rate setter. Fix rate setter. * Remove blocking from API endpoints. * Fix integration tests. * Update dashboard * Fix integration tests * Revert "Remove blocking from API endpoints." This reverts commit ae62a24. * Revert API changes and test fixes * Revert test running script. * Add rate setter integration to activity plugin. * Set default PoW difficulty to zero and update scheduling rate. * Adjust rate setter parameters. Fix tests. * Add scheduler metrics to dashboard and webapi. * AccessMana is now Mana1 * package/mana/access* all gone * consensusbase renamed to manabase implementing base interface for both access and consensus mana * consensusbasevector renamed to manabasevector implementing basevector interface for both access and consensus mana * both mana vectors are now maintained using 2 instances of ManaBaseVector (former ConsensusBaseVector) * update methods removed from both interfaces and implementations * SetCoefficients gone, along with corresponding mana plugin parameters * * EffectiveValue methods removed, only BaseValue remains * manarefresher is gone * DelegationAddress stuff managed by the plugin also gone * Reclaim functionality removed * corresponding WebAPI endpoints and response fields removed * cli-wallet delegation & reclaim removed * occurrences removed from Ansible and docker-compose files * GetMana and GetManaMap methods do not receive and optional time anymore, but they still return a timestamp which is always set to time.Now(). This timestamp should be tied to the epoch timestamp for the committed mana vector. Conflicts: packages/mana/accessbasevector.go packages/mana/manabasevector.go packages/mana/parameters.go plugins/core.go * Remove references to --mana.snapshotResetTime=true * Address PR review * Fixes after merge * Fix rate seter params and bugs * Adjust rate setter params * More parameter adjustment. * Fix integration tests. * Update hive.go dependency * Address review comments. * Mana initializer plugin and faucet web API endpoint (#2296) * Add manainitializer plugin and API endpoint. * Address review comments. * Simplify code * Add ! Co-authored-by: jonastheis <4181434+jonastheis@users.noreply.github.com> Co-authored-by: jkrvivian <jkrvivian@gmail.com> Co-authored-by: Luca Moser <moser.luca@gmail.com> Co-authored-by: Piotr Macek <piotr.macek@iota.org> Co-authored-by: Andrea V <1577639+karimodm@users.noreply.github.com> Co-authored-by: jonastheis <4181434+jonastheis@users.noreply.github.com>
- Loading branch information
1 parent
c1075be
commit 0e5e057
Showing
88 changed files
with
5,928 additions
and
4,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package client | ||
|
||
import ( | ||
"net/http" | ||
"time" | ||
|
||
"github.com/iotaledger/goshimmer/packages/jsonmodels" | ||
) | ||
|
||
const ( | ||
rateSetterInfo = "ratesetter" | ||
) | ||
|
||
// RateSetter gets the ratesetter estimate and the rate-setter info. | ||
func (api *GoShimmerAPI) RateSetter() (*jsonmodels.RateSetter, error) { | ||
res := &jsonmodels.RateSetter{} | ||
if err := api.do(http.MethodGet, rateSetterInfo, nil, res); err != nil { | ||
return nil, err | ||
} | ||
return res, nil | ||
} | ||
|
||
// SleepRateSetterEstimate gets the rate-setter estimate and the rate-setter info and later sleeps the estimated amount of time. | ||
func (api *GoShimmerAPI) SleepRateSetterEstimate() error { | ||
res, err := api.RateSetter() | ||
if err != nil { | ||
return err | ||
} | ||
time.Sleep(res.Estimate) | ||
return nil | ||
} |
Oops, something went wrong.