Skip to content

Instantly share code, notes, and snippets.

@lispc
Created June 23, 2022 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lispc/3348bf31dc118ad0f60ffe35408a74ce to your computer and use it in GitHub Desktop.
Save lispc/3348bf31dc118ad0f60ffe35408a74ce to your computer and use it in GitHub Desktop.
sync_deps.sh
function sync_agg() {
cd halo2-snark-aggregator
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { path = "../../halo2/halo2_proofs", default-features = true }#g'
find . -name Cargo.toml | xargs gsed -i 's#^zkevm-circuits = .*$#zkevm-circuits = { path = "../../zkevm-circuits/zkevm-circuits" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^eth-types = .*$#eth-types = { path = "../../zkevm-circuits/eth-types" }#g'
cd ..
}
function sync_agg_git() {
cd halo2-snark-aggregator
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "scroll-dev-0607" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^zkevm-circuits = .*$#zkevm-circuits = { git = "https://github.com/scroll-tech/zkevm-circuits", branch = "scroll-dev-0607", features = ["test"] }#g'
find . -name Cargo.toml | xargs gsed -i 's#^eth-types = .*$#eth-types = { git = "https://github.com/scroll-tech/zkevm-circuits", branch = "scroll-dev-0607" }#g'
cd ..
}
function sync_zkevm() {
cd zkevm-circuits
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "scroll-dev-0607" }#g'
#find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = { git.*$#halo2_proofs = { path = "../halo2/halo2_proofs", default-features = true }#g'
#find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = { version.*$#halo2_proofs = { path = "../../halo2/halo2_proofs", default-features = true }#g'
cd ..
}
function sync_mpt() {
cd mpt-circuit
#find . -name Cargo.toml | xargs gsed -i 's#halo2_proofs = .*$#halo2_proofs = { path = "../../halo2/halo2_proofs" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "scroll-dev-0607" }#g'
cd ..
}
function sync_common_rs() {
cd common-rs
find . -name Cargo.toml | xargs gsed -i 's#^zkevm-circuits = .*$#zkevm-circuits = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "scroll-dev-0607"] }#g'
find . -name Cargo.toml | xargs gsed -i 's#^eth-types = .*$#eth-types = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "scroll-dev-0607" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^bus-mapping = .*$#bus-mapping = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "scroll-dev-0607" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { git = "https://github.com/scroll-tech/halo.git", branch = "scroll-dev-0607" }#g'
cd ..
}
function sync_common_rs_local() {
cd common-rs
find . -name Cargo.toml | xargs gsed -i 's#^zkevm-circuits = .*$#zkevm-circuits = { path = "../../zkevm-circuits/zkevm-circuits", features = ["test"] }#g'
find . -name Cargo.toml | xargs gsed -i 's#^eth-types = .*$#eth-types = { path = "../../zkevm-circuits/eth-types" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^bus-mapping = .*$#bus-mapping = { path = "../../zkevm-circuits/bus-mapping" }#g'
find . -name Cargo.toml | xargs gsed -i 's#^halo2_proofs = .*$#halo2_proofs = { path = "../../halo2/halo2_proofs" }#g'
cd ..
}
#sync_agg_git
#sync_agg
#sync_zkevm
sync_common_rs
#sync_mpt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment