Compare commits
No commits in common. "v0.1.0-develop.15" and "v0.1.0-develop.14" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,10 +1,3 @@
|
|||
# [0.1.0-develop.15](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.14...v0.1.0-develop.15) (2023-07-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* implement isValidLightClientHeader ([6f07421](https://git.lumeweb.com/LumeWeb/libethsync/commit/6f07421fe80f008255cbe472204d8530e2bb3352))
|
||||
|
||||
# [0.1.0-develop.14](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.13...v0.1.0-develop.14) (2023-07-11)
|
||||
|
||||
|
||||
|
|
3
LICENSE
3
LICENSE
|
@ -1,7 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Hammer Technologies LLC
|
||||
Copyright (c) 2022 Shresth Agrawal
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libethclient",
|
||||
"version": "0.1.0-develop.15",
|
||||
"version": "0.1.0-develop.14",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libethclient",
|
||||
"version": "0.1.0-develop.15",
|
||||
"version": "0.1.0-develop.14",
|
||||
"dependencies": {
|
||||
"@chainsafe/as-sha256": "^0.3.1",
|
||||
"@chainsafe/bls": "7.1.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libethsync",
|
||||
"version": "0.1.0-develop.15",
|
||||
"version": "0.1.0-develop.14",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
32
src/util.ts
32
src/util.ts
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
createBeaconConfig,
|
||||
BeaconConfig,
|
||||
ChainForkConfig,
|
||||
} from "@lodestar/config";
|
||||
import { allForks } from "@lodestar/types";
|
||||
import { createBeaconConfig } from "@lodestar/config";
|
||||
import { BEACON_SYNC_SUPER_MAJORITY, mainnetConfig } from "./constants.js";
|
||||
import { networksChainConfig } from "@lodestar/config/networks";
|
||||
import { fromHexString } from "@chainsafe/ssz";
|
||||
|
@ -14,14 +9,7 @@ import axiosRetry from "axios-retry";
|
|||
import axios from "axios";
|
||||
import { digest } from "@chainsafe/as-sha256";
|
||||
import { concatBytes } from "@noble/hashes/utils";
|
||||
import {
|
||||
deserializeSyncCommittee,
|
||||
isValidMerkleBranch,
|
||||
} from "@lodestar/light-client/utils";
|
||||
import {
|
||||
BLOCK_BODY_EXECUTION_PAYLOAD_DEPTH as EXECUTION_PAYLOAD_DEPTH,
|
||||
BLOCK_BODY_EXECUTION_PAYLOAD_INDEX as EXECUTION_PAYLOAD_INDEX,
|
||||
} from "@lodestar/params";
|
||||
import { deserializeSyncCommittee } from "@lodestar/light-client/utils";
|
||||
|
||||
export function getDefaultClientConfig() {
|
||||
const chainConfig = createBeaconConfig(
|
||||
|
@ -115,19 +103,3 @@ export async function getConsensusOptimisticUpdate() {
|
|||
|
||||
return update.data;
|
||||
}
|
||||
function isValidLightClientHeader(
|
||||
config: ChainForkConfig,
|
||||
header: allForks.LightClientHeader,
|
||||
): boolean {
|
||||
return isValidMerkleBranch(
|
||||
config
|
||||
.getExecutionForkTypes(header.beacon.slot)
|
||||
.ExecutionPayloadHeader.hashTreeRoot(
|
||||
(header as capella.LightClientHeader).execution,
|
||||
),
|
||||
(header as capella.LightClientHeader).executionBranch,
|
||||
EXECUTION_PAYLOAD_DEPTH,
|
||||
EXECUTION_PAYLOAD_INDEX,
|
||||
header.beacon.bodyRoot,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue