mirror of
https://github.com/luxfi/coreth.git
synced 2026-10-30 17:00:51 +00:00
- Add post-quantum signature verification precompiles: - ML-DSA (FIPS 204) at address 0x0f - SLH-DSA (FIPS 205) at address 0x10 - Falcon at address 0x11 - ML-KEM key encapsulation at address 0x12 - Add api_lux.go with Lux-specific API extensions - Add precompile infrastructure from SubnetEVM: - allowlist module - contract interfaces - precompile config and modules - Update crypto dependency to v1.17.9 (with VerifySignature API) - Remove local replace directives for CI compatibility - Update import paths across 230+ files to use luxfi/crypto
40 lines
925 B
Plaintext
40 lines
925 B
Plaintext
package ethapi
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/luxfi/geth/common/hexutil"
|
|
)
|
|
|
|
type ReplayAPI struct {
|
|
b Backend
|
|
}
|
|
|
|
func NewReplayAPI(b Backend) *ReplayAPI {
|
|
return &ReplayAPI{b}
|
|
}
|
|
|
|
type ReplayStatus struct {
|
|
CurrentBlock *hexutil.Big `json:"currentBlock"`
|
|
HighestBlock *hexutil.Big `json:"highestBlock"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
func (api *ReplayAPI) Replay(ctx context.Context) (*ReplayStatus, error) {
|
|
currentBlock := api.b.CurrentBlock()
|
|
if currentBlock == nil {
|
|
return &ReplayStatus{
|
|
CurrentBlock: (*hexutil.Big)(hexutil.Big(*hexutil.MustDecodeBig("0x0"))),
|
|
HighestBlock: (*hexutil.Big)(hexutil.Big(*hexutil.MustDecodeBig("0x0"))),
|
|
Status: "initializing",
|
|
}, nil
|
|
}
|
|
|
|
currentBlockNumber := currentBlock.Number
|
|
|
|
return &ReplayStatus{
|
|
CurrentBlock: (*hexutil.Big)(currentBlockNumber),
|
|
HighestBlock: (*hexutil.Big)(currentBlockNumber),
|
|
Status: "synced",
|
|
}, nil
|
|
} |