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

Implement slashingRate related APIs #159

Merged
merged 11 commits into from
Aug 7, 2023

Conversation

goldworm-icon
Copy link
Member

  • Introduce RevisionPreIISS4(23)
  • Implement setSlashingRate() and getSlashingRate()
  • Refactor icmodule/penalty.go

@goldworm-icon goldworm-icon self-assigned this Aug 3, 2023
@goldworm-icon goldworm-icon changed the base branch from master to iiss4 August 3, 2023 06:50
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

❗ No coverage uploaded for pull request base (iiss4@ae2ac36). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head e2ce10c differs from pull request most recent head 68b09a9. Consider uploading reports for the commit 68b09a9 to get more accurate results

Impacted file tree graph

@@           Coverage Diff            @@
##             iiss4     #159   +/-   ##
========================================
  Coverage         ?   45.17%           
========================================
  Files            ?      360           
  Lines            ?    56958           
  Branches         ?        0           
========================================
  Hits             ?    25732           
  Misses           ?    28872           
  Partials         ?     2354           

}
rates[name] = icmodule.Rate(value.Int64())
}
return es.SetSlashingRates(s.newCallContext(s.cc), rates)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without event?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!!

icon/iiss/extension.go Outdated Show resolved Hide resolved
icon/iiss/icstate/networkvalue.go Show resolved Hide resolved
icon/iiss/icstate/networkvalue.go Outdated Show resolved Hide resolved
icon/iiss/icstate/networkvalue.go Outdated Show resolved Hide resolved
…lashingRate APIs in ChainScore after RevisonPreIISS4

* setSlashingRates will supersede them
* Reinforce parameter validation
* Record SlashingRateChangedV2(str,int) eventLogs
@goldworm-icon goldworm-icon merged commit 761b3ca into iiss4 Aug 7, 2023
@goldworm-icon goldworm-icon deleted the goldworm-BDT-664-imp-set-slashing-rate branch August 7, 2023 05:35
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.

3 participants