Skip to content

Conversation

@emberian
Copy link
Contributor

@emberian emberian commented Mar 27, 2024

"Ledger validation tool"

Develop twin: #15455

Test plan:

  1. Run a hardfork package job the normal way, see that it is happy
  2. Be evil and edit the verify script to tamper with the ledger
  3. Run a hardfork package job the evil way, see that it is sad

@emberian emberian requested review from a team as code owners March 27, 2024 20:36
@emberian
Copy link
Contributor Author

!ci-build-me

@emberian emberian force-pushed the feat/verify-epoch-ledgers-too branch from 174c5c6 to 34ed2b1 Compare March 28, 2024 00:01
emberian and others added 7 commits March 27, 2024 21:09
Problem: set_verification_key permission format was changed to include
tx_version which changed the algorithm for ledger hash verification.
This obstructs attempts to generate old-network-format hashes.

Solution: provide an option to omit tx version of set_verification_key
permission when computing the ledger hash.
mkdir -p "$workdir"
mkdir -p "$workdir/ledgers"
mkdir -p "$workdir/ledgers-backup"
mkdir -p "$workdir/keys"
Copy link
Member

Choose a reason for hiding this comment

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

Why not write above commands in one line?

mkdir -p "$workdir"/{ledgers,ledgers-backup,keys}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when there was only one .... the thought had yet to occur to me that there would be three.

@emberian emberian force-pushed the feat/verify-epoch-ledgers-too branch from 3e9a230 to 2b7fabe Compare April 2, 2024 18:27
@dkijania
Copy link
Member

dkijania commented Apr 2, 2024

@emberian looks like there is unrelated code for debian dependencies selected is it intended

&& echo "deb [trusted=yes] http://packages.o1test.net $deb_codename $deb_release" > /etc/apt/sources.list.d/o1.list \
&& apt-get update --quiet --yes \
&& apt-get install --quiet --yes --allow-downgrades "${MINA_DEB}=$deb_version" \
&& apt-get install --quiet --yes --allow-downgrade "mina-create-legacy-ledger=1.4.0beta2-georgeee-port-runtime-genesis-ledger-to-compatible-9a494bf" \
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if this is a good idea to depend on personal branch debian

Copy link
Contributor Author

Choose a reason for hiding this comment

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

still waiting on https://buildkite.com/o-1-labs-2/mina-end-to-end-nightlies/builds/1750 to be able to update it

the other problem is that we need to ensure that there is a copy of this package available for every channel, otherwise the container will fail to build.

the alternative seems like a weird type of buildkite job that would have to depend on two branches simultaneously.

Copy link
Member

Choose a reason for hiding this comment

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

@emberian you can use version: 1.4.0beta2-compatible-97f7d8c

Copy link
Member

Choose a reason for hiding this comment

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

I believe it's already being used

@emberian emberian marked this pull request as draft April 2, 2024 20:41
@emberian
Copy link
Contributor Author

emberian commented Apr 2, 2024

!ci-build-me

@emberian
Copy link
Contributor Author

emberian commented Apr 3, 2024

!ci-build-me

1 similar comment
@georgeee
Copy link
Member

georgeee commented Apr 3, 2024

!ci-build-me

@dkijania
Copy link
Member

dkijania commented Apr 3, 2024

!ci-build-me

@georgeee georgeee marked this pull request as ready for review April 4, 2024 16:56
@georgeee
Copy link
Member

georgeee commented Apr 4, 2024

!ci-build-me

@georgeee
Copy link
Member

georgeee commented Apr 4, 2024

@georgeee
Copy link
Member

georgeee commented Apr 4, 2024

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

@deepthiskumar deepthiskumar merged commit 57e060c into berkeley Apr 5, 2024
@deepthiskumar deepthiskumar deleted the feat/verify-epoch-ledgers-too branch April 5, 2024 16:08
, extraEnv = [ "CONFIG_JSON_GZ_URL=\$CONFIG_JSON_GZ_URL", "NETWORK_NAME=\$NETWORK_NAME" ]
-- an account with this balance seems present in many ledgers?
} "curl \$CONFIG_JSON_GZ_URL > config.json.gz && gunzip config.json.gz && sed -e '0,/20.000001/{s/20.000001/20.01/}' -i config.json && (mina-verify-packaged-fork-config \$NETWORK_NAME config.json /workdir/verification && false)"
} "curl \$CONFIG_JSON_GZ_URL > config.json.gz && gunzip config.json.gz && sed -e '0,/20.000001/{s/20.000001/20.01/}' -i config.json && ! (mina-verify-packaged-fork-config \$NETWORK_NAME config.json /workdir/verification)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

d'oh the laws of material implication strike again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants