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

Mana initializer plugin and faucet web API endpoint #2296

Merged
merged 7 commits into from
Jun 21, 2022

Conversation

piotrm50
Copy link
Contributor

Description of change

Adds mana initializer plugin that requests mana on node startup directly from faucet via web API request.

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • My code follows the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@jonastheis jonastheis merged commit c7ac60f into feat/rate-setter Jun 21, 2022
@jonastheis jonastheis deleted the feat/manainitializer branch June 21, 2022 08:20
jonastheis added a commit that referenced this pull request Jun 21, 2022
* 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>
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

Successfully merging this pull request may close these issues.

2 participants