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

Remove deprecated ethash_verify() #226

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.0.0] — unreleased

- Removed: Deprecated function `ethash_verify()` has been removed.
Use `ethash_verify_against_boundary()`.
[#226](https://github.com/chfast/ethash/pull/226)

## [0.9.0] — 2022-04-05

- Added: The constant `ETHASH_MAX_EPOCH_NUMBER = 32639` representing
Expand Down Expand Up @@ -138,6 +144,7 @@
- Added: Experimental support for [ProgPoW] [0.9.1][ProgPoW-changelog].


[1.0.0]: https://github.com/chfast/ethash/compare/v0.9.0..master
[0.9.0]: https://github.com/chfast/ethash/releases/tag/v0.9.0
[0.8.0]: https://github.com/chfast/ethash/releases/tag/v0.8.0
[0.7.1]: https://github.com/chfast/ethash/releases/tag/v0.7.1
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/ethash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ def verify(epoch_number, header_hash, mix_hash, nonce, boundary):
c_boundary = ffi.new('union ethash_hash256*')
c_boundary[0].str = boundary

ec = lib.ethash_verify(ctx, c_header_hash, c_mix_hash, nonce, c_boundary)
ec = lib.ethash_verify_against_boundary(ctx, c_header_hash, c_mix_hash, nonce, c_boundary)
return ec == 0
2 changes: 1 addition & 1 deletion bindings/python/ethash/_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
struct ethash_result ethash_hash(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, uint64_t nonce);

bool ethash_verify(const struct ethash_epoch_context* context,
bool ethash_verify_against_boundary(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, const union ethash_hash256* mix_hash, uint64_t nonce,
const union ethash_hash256* boundary);

Expand Down
19 changes: 0 additions & 19 deletions include/ethash/ethash.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@

#pragma clang diagnostic pop

#if defined(__cplusplus) && __has_cpp_attribute(deprecated) < __cplusplus
#define DEPRECATED(MSG) [[deprecated(MSG)]]
#elif __has_attribute(deprecated)
#define DEPRECATED(MSG) __attribute__((deprecated(MSG)))
#else
#define DEPRECATED(MSG)
#endif

#ifndef __cplusplus
#define noexcept // Ignore noexcept in C code.
#endif
Expand Down Expand Up @@ -180,17 +172,6 @@ ethash_errc ethash_verify_against_difficulty(const struct ethash_epoch_context*
const union ethash_hash256* difficulty) noexcept;


/**
* @deprecated Use ethash_verify_against_boundary().
*/
DEPRECATED("use ethash_verify_against_boundary()")
static inline ethash_errc ethash_verify(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, const union ethash_hash256* mix_hash, uint64_t nonce,
const union ethash_hash256* boundary) noexcept
{
return ethash_verify_against_boundary(context, header_hash, mix_hash, nonce, boundary);
}

/**
* Verify only the final hash. This can be performed quickly without accessing Ethash context.
*
Expand Down