Skip to content

Conversation

@ceyonur
Copy link
Contributor

@ceyonur ceyonur commented Sep 17, 2025

Why this should be merged

Adds relevant excess calculation and math functions for acp-226

https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/226-dynamic-minimum-block-times/README.md#minimumblockdelayexcess

This is a very similar package as in https://github.com/ava-labs/coreth/tree/master/plugin/evm/upgrade/acp176

How this works

Adds functions from https://github.com/ava-labs/coreth/tree/master/plugin/evm/upgrade/acp176 with acp-226 parameters defined in the spec.

How this was tested

added tests

Need to be documented in RELEASES.md?

probably not

@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 17:53
@ceyonur ceyonur marked this pull request as draft September 17, 2025 17:53
@ceyonur ceyonur self-assigned this Sep 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds ACP-226 math package that implements dynamic minimum block delay calculations. The package provides functionality for calculating target delays based on excess values using exponential pricing mechanisms similar to those found in ACP-176.

Key changes:

  • Implements core ACP-226 math functions for target delay excess calculations
  • Adds comprehensive test coverage for all mathematical operations
  • Provides serialization/deserialization utilities for state management

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
vms/evm/acp226/acp226.go Core implementation of ACP-226 math functions including target delay calculations, excess updates, and state serialization
vms/evm/acp226/acp226_test.go Comprehensive test suite covering all mathematical operations, edge cases, and benchmarks

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ceyonur ceyonur marked this pull request as ready for review September 17, 2025 18:13
@StephenButtolph StephenButtolph changed the title add acp-226 math package Implement ACP-226 Math Sep 18, 2025
ceyonur and others added 6 commits September 18, 2025 13:44
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
@ceyonur
Copy link
Contributor Author

ceyonur commented Sep 18, 2025

closes ava-labs/coreth#1230

Copy link
Contributor

@alarso16 alarso16 left a comment

Choose a reason for hiding this comment

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

I assume we can come up with some way of combining the math with everything acp176 related, since most of the code is super similar, but it looks correct

@StephenButtolph StephenButtolph added this pull request to the merge queue Sep 18, 2025
Merged via the queue into master with commit 8aa4f1e Sep 18, 2025
35 checks passed
@StephenButtolph StephenButtolph deleted the ceyonur/acp-226-math-package branch September 18, 2025 19:35
@github-project-automation github-project-automation bot moved this from In Review 🔎 to Done 🎉 in avalanchego Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants