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

EFM Recovery Service Event and Transaction #440

Open
wants to merge 65 commits into
base: feature/efm-recovery
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f645974
efm recovery transaction
kc1116 Jul 30, 2024
3b3a9ec
use provided recovery epoch counter as the source of truth
kc1116 Aug 1, 2024
52ff178
add proper line indentation
kc1116 Aug 1, 2024
9f8ceed
update assets
kc1116 Aug 1, 2024
dd90e0e
define ResultSubmission struct
jordanschalm Aug 7, 2024
7638aeb
annotate required changes
jordanschalm Aug 7, 2024
4e0bc0c
setup test framework
jordanschalm Aug 7, 2024
22ba195
add preliminary new fields to EpochCommit
jordanschalm Aug 8, 2024
e37f616
add submission tracker sketch
jordanschalm Aug 8, 2024
4a0b5dd
Apply suggestions from code review
kc1116 Aug 14, 2024
e493a46
Apply suggestions from code review
kc1116 Aug 14, 2024
1b411fb
adjust recover transaction logic
kc1116 Aug 14, 2024
6b9a7fa
move recoverEpochPreChecks call to emitEpochRecoverEvent
kc1116 Aug 15, 2024
0a508af
fix broken sentence
kc1116 Aug 15, 2024
0e0ad05
add comment describing unsafeAllowOverwrite
kc1116 Aug 15, 2024
fd6ddfa
use previous syntax for randomSource generation
kc1116 Aug 15, 2024
e2323ee
replace usage of numViewsInStakingAuction and numViewsInDKGPhase
kc1116 Aug 23, 2024
435a55d
add godoc for convertClusterQcsCdc
kc1116 Aug 23, 2024
48a491c
add additional test cases
kc1116 Aug 30, 2024
26039c5
ResultSubmission tests
jordanschalm Sep 11, 2024
88cd509
ResultSubmission docs
jordanschalm Sep 11, 2024
829586b
addSubmission method
jordanschalm Sep 12, 2024
db7aa57
add tx todos
jordanschalm Sep 12, 2024
14a70ab
add init test, validation on ResultSubmission init
jordanschalm Sep 13, 2024
c6e6369
test comments
jordanschalm Sep 13, 2024
cb02364
basic SubmissionTracker tests
jordanschalm Sep 13, 2024
e694f71
update other contract methods to use SubmissionTracker
jordanschalm Sep 13, 2024
854a570
add dummy values for EpochCommit event
jordanschalm Sep 13, 2024
257ddb6
add docs
jordanschalm Sep 13, 2024
5d9f137
add exceedsThreshold test
jordanschalm Sep 13, 2024
94c8cbb
Merge branch 'feature/efm-recovery' into jord/6213-dkg-mapping
jordanschalm Sep 13, 2024
027e41d
update FlowEpoch to compile
jordanschalm Sep 13, 2024
b1afc65
update transactions
jordanschalm Sep 13, 2024
56b12c1
improve representation for "empty submissions"
jordanschalm Sep 14, 2024
507a454
add test for empty submission
jordanschalm Sep 14, 2024
a9d24b4
test empty submission exceeds threshold
jordanschalm Sep 14, 2024
023faed
fix go test: send submission
jordanschalm Sep 14, 2024
5f236fb
wip
jordanschalm Sep 16, 2024
423fb44
remove '
jordanschalm Sep 16, 2024
23ade80
incredibly, the tests are passing
jordanschalm Sep 16, 2024
8f669f1
note where tests still need updating
jordanschalm Sep 16, 2024
060fbb5
consistent terminology: empty submission
jordanschalm Sep 17, 2024
3553260
resolve some todos
jordanschalm Sep 17, 2024
9db9ab8
fix empty submission dkg tests
jordanschalm Sep 17, 2024
135cad6
fix epoch tests
jordanschalm Sep 17, 2024
80f1f91
rename publish admin script
jordanschalm Sep 17, 2024
1fd997b
store as much as possible in EpochMetadata
jordanschalm Sep 17, 2024
9b623b3
build static files
jordanschalm Sep 17, 2024
3e32ac5
make more functions view
jordanschalm Sep 17, 2024
af7e508
fix test
jordanschalm Sep 17, 2024
59b7108
add dkgIdMapping
kc1116 Sep 27, 2024
07090b8
rename isValidNilSubmission
jordanschalm Oct 3, 2024
496f9f8
Merge branch 'jord/6213-dkg-mapping' into khalil/5639-efm-recovery-tr…
jordanschalm Oct 9, 2024
8dae842
Updated epoch recovery tx to accept dkg group key as well as emitting…
durkmurder Oct 10, 2024
ed047b9
update error messages
jordanschalm Oct 10, 2024
3aee4ca
go generate
jordanschalm Oct 10, 2024
50e054a
Apply suggestions from code review
jordanschalm Oct 10, 2024
526bdbe
2nd pass over error messages
jordanschalm Oct 10, 2024
ecbf7bb
Merge branch 'jord/6213-dkg-mapping' of github.com:onflow/flow-core-c…
jordanschalm Oct 10, 2024
464db6d
fix empty whiteboard message test
jordanschalm Oct 10, 2024
4e09f85
improve post whiteboard message test
jordanschalm Oct 10, 2024
6931e78
rm dupe test
jordanschalm Oct 10, 2024
f292cc7
address remaining todos in tests
jordanschalm Oct 11, 2024
afacbe7
Merge branch 'jord/6213-dkg-mapping' into khalil/5639-efm-recovery-tr…
jordanschalm Oct 11, 2024
9a7af20
Merge branch 'feature/efm-recovery' into khalil/5639-efm-recovery-tra…
jordanschalm Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Update PATH
run: echo "/root/.local/bin" >> $GITHUB_PATH
- name: Run tests
run: export GOPATH=$HOME/go && make ci
run: export GOPATH=$HOME/go && make ci
15 changes: 15 additions & 0 deletions contracts/epochs/FlowClusterQC.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ access(all) contract FlowClusterQC {
}
}

/// Represents the quorum certificate vote data for a signer
/// of the certificate.
access(all) struct ClusterQCVoteData {
/// The aggregated signature, hex-encoded, encompasses all individual vote signatures contributed by nodes across the cluster
access(all) let aggregatedSignature: String

/// The node IDs that contributed their vote to the aggregated signature
access(all) let voterIDs: [String]

init(aggregatedSignature: String, voterIDs: [String]) {
self.aggregatedSignature = aggregatedSignature
Copy link
Member

Choose a reason for hiding this comment

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

Are there any pre-conditions we can do here to verify anything?

self.voterIDs = voterIDs
}
}

/// The Voter resource is generated for each collection node after they register.
/// Each resource instance is good for all future potential epochs, but will
/// only be valid if the node operator has been confirmed as a collector node for the next epoch.
Expand Down
323 changes: 310 additions & 13 deletions contracts/epochs/FlowEpoch.cdc

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions lib/go/contracts/internal/assets/assets.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions lib/go/templates/epoch_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
updateRewardPercentageFilename = "epoch/admin/update_reward.cdc"
advanceViewFilename = "epoch/admin/advance_view.cdc"
resetEpochFilename = "epoch/admin/reset_epoch.cdc"
recoverEpochFilename = "epoch/admin/recover_epoch.cdc"
epochCalculateSetRewardsFilename = "epoch/admin/calculate_rewards.cdc"
epochPayRewardsFilename = "epoch/admin/pay_rewards.cdc"
epochSetAutoRewardsFilename = "epoch/admin/set_automatic_rewards.cdc"
Expand Down Expand Up @@ -114,6 +115,12 @@ func GenerateResetEpochScript(env Environment) []byte {
return []byte(ReplaceAddresses(code, env))
}

func GenerateRecoverEpochScript(env Environment) []byte {
code := assets.MustAssetString(recoverEpochFilename)

return []byte(ReplaceAddresses(code, env))
}

func GenerateEpochCalculateSetRewardsScript(env Environment) []byte {
code := assets.MustAssetString(epochCalculateSetRewardsFilename)

Expand Down
23 changes: 23 additions & 0 deletions lib/go/templates/internal/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading