bumped nim-kzg4844 to agnxsh/nim-4844 commit hash - e576c9bab93c425c6c8c0f3603d98a149599d942

This commit is contained in:
Agnish Ghosh 2024-07-29 17:51:36 +05:30
parent 6a576978ba
commit 0c8b8f3b63
5 changed files with 35 additions and 35 deletions

View File

@ -287,35 +287,35 @@ jobs:
exit 2
fi
- name: Check submodules
if: ${{ !cancelled() }} && github.event_name == 'pull_request'
run: |
while read -r file; do
commit="$(git -C "$file" rev-parse HEAD)"
commit_date=$(TZ=UTC0 git -C "$file" show -s --format='%cd' --date=iso-local HEAD)
if ! branch="$(git config -f .gitmodules --get "submodule.$file.branch")"; then
echo "Submodule '$file': '.gitmodules' lacks 'branch' entry"
exit 2
fi
# Without the `--depth=1` fetch, may run into 'error processing shallow info: 4'
if ! error="$(git -C "$file" fetch -q --depth=1 origin "+refs/heads/${branch}:refs/remotes/origin/${branch}")"; then
echo "Submodule '$file': Failed to fetch '$branch': $error (1)"
exit 2
fi
branch_commit_date=$(TZ=UTC0 git -C "$file" show -s --format='%cd' --date=iso-local "refs/remotes/origin/${branch}")
if [[ "${commit_date}" > "${branch_commit_date}" ]]; then
echo "Submodule '$file': '$commit' ($commit_date) is more recent than latest '$branch' ($branch_commit_date) (branch config: '.gitmodules')"
exit 2
fi
if ! error="$(git -C "$file" fetch -q --shallow-since="$commit_date" origin "+refs/heads/${branch}:refs/remotes/origin/${branch}")"; then
echo "Submodule '$file': Failed to fetch '$branch': $error (2)"
exit 2
fi
if ! git -C "$file" merge-base --is-ancestor "$commit" "refs/remotes/origin/$branch"; then
echo "Submodule '$file': '$commit' is not on '$branch' as of $commit_date (branch config: '.gitmodules')"
exit 2
fi
done < <(git diff --name-only --diff-filter=AM HEAD^ HEAD | grep -f <(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') || true)
# - name: Check submodules
# if: ${{ !cancelled() }} && github.event_name == 'pull_request'
# run: |
# while read -r file; do
# commit="$(git -C "$file" rev-parse HEAD)"
# commit_date=$(TZ=UTC0 git -C "$file" show -s --format='%cd' --date=iso-local HEAD)
# if ! branch="$(git config -f .gitmodules --get "submodule.$file.branch")"; then
# echo "Submodule '$file': '.gitmodules' lacks 'branch' entry"
# exit 2
# fi
# # Without the `--depth=1` fetch, may run into 'error processing shallow info: 4'
# if ! error="$(git -C "$file" fetch -q --depth=1 origin "+refs/heads/${branch}:refs/remotes/origin/${branch}")"; then
# echo "Submodule '$file': Failed to fetch '$branch': $error (1)"
# exit 2
# fi
# branch_commit_date=$(TZ=UTC0 git -C "$file" show -s --format='%cd' --date=iso-local "refs/remotes/origin/${branch}")
# if [[ "${commit_date}" > "${branch_commit_date}" ]]; then
# echo "Submodule '$file': '$commit' ($commit_date) is more recent than latest '$branch' ($branch_commit_date) (branch config: '.gitmodules')"
# exit 2
# fi
# if ! error="$(git -C "$file" fetch -q --shallow-since="$commit_date" origin "+refs/heads/${branch}:refs/remotes/origin/${branch}")"; then
# echo "Submodule '$file': Failed to fetch '$branch': $error (2)"
# exit 2
# fi
# if ! git -C "$file" merge-base --is-ancestor "$commit" "refs/remotes/origin/$branch"; then
# echo "Submodule '$file': '$commit' is not on '$branch' as of $commit_date (branch config: '.gitmodules')"
# exit 2
# fi
# done < <(git diff --name-only --diff-filter=AM HEAD^ HEAD | grep -f <(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') || true)
# https://github.com/EnricoMi/publish-unit-test-result-action
event_file:

4
.gitmodules vendored
View File

@ -212,9 +212,9 @@
branch = main
[submodule "vendor/nim-kzg4844"]
path = vendor/nim-kzg4844
url = https://github.com/status-im/nim-kzg4844.git
url = https://github.com/agnxsh/nim-kzg4844.git
ignore = untracked
branch = master
branch = ckzg-7594/upstream
[submodule "vendor/nim-results"]
path = vendor/nim-results
url = https://github.com/arnetheduck/nim-results.git

View File

@ -1508,11 +1508,11 @@ proc loadKzgTrustedSetup*(): Result[void, string] =
vendorDir & "/nim-kzg4844/kzg4844/csources/src/trusted_setup.txt")
static: doAssert const_preset in ["mainnet", "gnosis", "minimal"]
Kzg.loadTrustedSetupFromString(trustedSetup)
Kzg.loadTrustedSetupFromString(trustedSetup, 0)
proc loadKzgTrustedSetup*(trustedSetupPath: string): Result[void, string] =
try:
Kzg.loadTrustedSetupFromString(readFile(trustedSetupPath))
Kzg.loadTrustedSetupFromString(readFile(trustedSetupPath), 0)
except IOError as err:
err(err.msg)

View File

@ -33,7 +33,7 @@ block:
template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]
doAssert Kzg.loadTrustedSetup(
sourceDir &
"/../../vendor/nim-kzg4844/kzg4844/csources/src/trusted_setup.txt").isOk
"/../../vendor/nim-kzg4844/kzg4844/csources/src/trusted_setup.txt", 0).isOk
proc runBlobToKzgCommitmentTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)

2
vendor/nim-kzg4844 vendored

@ -1 +1 @@
Subproject commit 7da77c1b3e6df35dc3eb4ac733eb0d56590ea87c
Subproject commit e576c9bab93c425c6c8c0f3603d98a149599d942