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

Complete SignedEpoch JSON migration in v0.19.0 #2593

Closed
xenowits opened this issue Sep 21, 2023 · 0 comments · Fixed by #2819
Closed

Complete SignedEpoch JSON migration in v0.19.0 #2593

xenowits opened this issue Sep 21, 2023 · 0 comments · Fixed by #2819
Assignees
Labels
protocol Protocol Team tickets v0.19.0

Comments

@xenowits
Copy link
Contributor

xenowits commented Sep 21, 2023

🎯 Problem to be solved

Complete signed epoch JSON migration in v0.19.0. See the migrations doc.

🛠️ Proposed solution

Refactor SignedEpoch.UnmarshalJSON() to the following:

// UnmarshalJSON unmarshalls SignedEpoch.
func (s *SignedEpoch) UnmarshalJSON(b []byte) error {
	var resp signedEpochJSON
	if err := json.Unmarshal(b, &resp); err != nil {
		return errors.Wrap(err, "unmarshal signed epoch")
	}

	s.Epoch = resp.Epoch
	s.Signature = resp.Signature

	return nil
}

Also, remove legacySignedEpochJSON type in the same file.

@github-actions github-actions bot added the protocol Protocol Team tickets label Sep 21, 2023
@dB2510 dB2510 self-assigned this Jan 24, 2024
@dB2510 dB2510 linked a pull request Jan 24, 2024 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue Jan 24, 2024
Removes legacy signed epoch as part of migration.

category: refactor
ticket: #2593
gsora pushed a commit that referenced this issue Jan 25, 2024
Removes legacy signed epoch as part of migration.

category: refactor
ticket: #2593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol Protocol Team tickets v0.19.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants