Skip to content

Commit

Permalink
Merge pull request #1040 from godwokenrises/1.13-rc-testnet-fork-to-p…
Browse files Browse the repository at this point in the history
…oly1.5.5

config: add new fork for testnet at block#2430000
  • Loading branch information
Flouse authored Apr 7, 2023
2 parents d064924 + 7421a32 commit 00bd950
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions crates/builtin-binaries/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ fn main() {

#[cfg(not(feature = "no-builtin"))]
fn main() {
// Copy polyjuice v1.5.3 files
// Copy polyjuice v1.5.5 files
{
let path = Path::new(BINARIES_DIR).join("godwoken-polyjuice-v1.5.3/generator");
if !path.exists() {
std::fs::create_dir_all(path.parent().unwrap()).unwrap();
let target_path = Path::new(BINARIES_DIR).join("godwoken-polyjuice-v1.5.5/generator");
if !target_path.exists() {
let dir = target_path.parent().unwrap();
std::fs::create_dir_all(dir).unwrap();

let src = Path::new(GWOS_EVM_DIR).join("generator");
std::fs::copy(src, path).unwrap();
std::fs::copy(src, dir.join("generator")).unwrap();

let src = Path::new(GWOS_EVM_DIR).join("generator.debug");
std::fs::copy(src, dir.join("generator.debug")).unwrap();
}
}

Expand Down Expand Up @@ -95,6 +100,14 @@ fn main() {
"godwoken-polyjuice-v1.5.3/generator",
h256!("0x342bac1659df8b1f12201ff952efc298b17d8875bda911ca059629486338604c"),
),
(
"godwoken-polyjuice-v1.5.5/generator",
h256!("0xe4d2fed018645548204215413c13abd24ad94398ee28822c4f8f503268fefddb"),
),
(
"godwoken-polyjuice-v1.5.5/generator.debug",
h256!("0x25e8f3889c890805bc4eaca0c564fc64c1ced7b85d4592147d679de2cdf56fd4"),
),
] {
let path = Path::new(BINARIES_DIR).join(path);
verify_checksum(checksum, &path)
Expand Down
9 changes: 9 additions & 0 deletions crates/config/src/consensus/builtins/testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ generator_checksum = '0x342bac1659df8b1f12201ff952efc298b17d8875bda911ca05962948
validator_script_type_hash = '0x1629b04b49ded9e5747481f985b11cba6cdd4ffc167971a585e96729455ca736'
backend_type = 'Polyjuice'

[[backend_forks]]
fork_height = 2430000
# https://github.com/godwokenrises/godwoken/tree/57b9fc469f04fa7d5dadd6455a3217ffdde718da/gwos-evm
[[backend_forks.backends]]
generator = { bundled = 'builtin/godwoken-polyjuice-v1.5.5/generator' }
generator_checksum = '0xe4d2fed018645548204215413c13abd24ad94398ee28822c4f8f503268fefddb'
validator_script_type_hash = '0x1629b04b49ded9e5747481f985b11cba6cdd4ffc167971a585e96729455ca736'
backend_type = 'Polyjuice'


[genesis]
timestamp = 1651979802446
Expand Down
3 changes: 3 additions & 0 deletions gwos-evm/polyjuice-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ gw-traits = { path = "../../crates/traits/" }
gw-generator = { path = "../../crates/generator/" }
gw-builtin-binaries = { path = "../../crates/builtin-binaries" }

jsonrpc-utils = { version = "=0.2.0-preview.4", features = ["client"] }
jsonrpc-utils-macros = "=0.2.0-preview.4"

####
#Sync patch version with godwoken core.
tracing = { version = "0.1.36", features = ["attributes"] }
Expand Down
2 changes: 2 additions & 0 deletions gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ gw-utils = { path = "../../../../crates/utils/" }
gw-config = { path = "../../../../crates/config/", features = ["no-builtin"] }
gw-traits = { path = "../../../../crates/traits/" }

jsonrpc-utils = { version = "=0.2.0-preview.4", features = ["client"] }
jsonrpc-utils-macros = "=0.2.0-preview.4"
ckb-vm = { version = "=0.22.0", default-features = false }
ckb-vm-aot = { version = "=0.22.0" }
once_cell = "1.14.0"
Expand Down

0 comments on commit 00bd950

Please sign in to comment.