Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pascal hardfork #2692

Merged
merged 6 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ var (
utils.CachePreimagesFlag,
utils.OverridePassedForkTime,
utils.OverrideBohr,
utils.OverridePascal,
utils.OverrideVerkle,
utils.MultiDataBaseFlag,
}, utils.DatabaseFlags),
Expand Down Expand Up @@ -262,6 +263,10 @@ func initGenesis(ctx *cli.Context) error {
v := ctx.Uint64(utils.OverrideBohr.Name)
overrides.OverrideBohr = &v
}
if ctx.IsSet(utils.OverridePascal.Name) {
v := ctx.Uint64(utils.OverridePascal.Name)
overrides.OverridePascal = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)
overrides.OverrideVerkle = &v
Expand Down
4 changes: 4 additions & 0 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
v := ctx.Uint64(utils.OverrideBohr.Name)
cfg.Eth.OverrideBohr = &v
}
if ctx.IsSet(utils.OverridePascal.Name) {
v := ctx.Uint64(utils.OverridePascal.Name)
cfg.Eth.OverridePascal = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)
cfg.Eth.OverrideVerkle = &v
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var (
utils.RialtoHash,
utils.OverridePassedForkTime,
utils.OverrideBohr,
utils.OverridePascal,
utils.OverrideVerkle,
utils.OverrideFullImmutabilityThreshold,
utils.OverrideMinBlocksForBlobRequests,
Expand Down
7 changes: 6 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,19 @@ var (
}
OverridePassedForkTime = &cli.Uint64Flag{
Name: "override.passedforktime",
Usage: "Manually specify the hard fork timestamp except the last one, overriding the bundled setting",
Usage: "Manually specify the hard fork timestamps which have passed on the mainnet, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideBohr = &cli.Uint64Flag{
Name: "override.bohr",
Usage: "Manually specify the Bohr fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverridePascal = &cli.Uint64Flag{
Name: "override.pascal",
Usage: "Manually specify the Pascal fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideVerkle = &cli.Uint64Flag{
Name: "override.verkle",
Usage: "Manually specify the Verkle fork timestamp, overriding the bundled setting",
Expand Down
4 changes: 4 additions & 0 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func (e *GenesisMismatchError) Error() string {
type ChainOverrides struct {
OverridePassedForkTime *uint64
OverrideBohr *uint64
OverridePascal *uint64
OverrideVerkle *uint64
}

Expand Down Expand Up @@ -256,6 +257,9 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
if overrides != nil && overrides.OverrideBohr != nil {
config.BohrTime = overrides.OverrideBohr
}
if overrides != nil && overrides.OverridePascal != nil {
config.PascalTime = overrides.OverridePascal
}
if overrides != nil && overrides.OverrideVerkle != nil {
config.VerkleTime = overrides.OverrideVerkle
}
Expand Down
1 change: 1 addition & 0 deletions core/systemcontracts/pascal/chapel/CrossChainContract
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
608060405234801561001057600080fd5b50600436106102695760003560e01c806375d47a0a11610151578063c81b1662116100c3578063e1c7392a11610087578063e1c7392a14610839578063e3b0480514610841578063e6400bbe14610861578063f7a251d714610869578063f9a2bbc7146108e1578063fd6a6879146108e957610269565b8063c81b1662146107ea578063ccc108d7146107f2578063d31f968d146107fa578063dc927faf14610829578063df8079e91461083157610269565b8063a78abc1611610115578063a78abc16146106d3578063aa82dce1146106db578063aad56063146106e3578063ab51bb96146106eb578063ac4317511461070c578063c27cdcfb146107ca57610269565b806375d47a0a146105d85780637e434d54146105e057806384013b6a146105e85780639dc09262146106c3578063a1a11bf5146106cb57610269565b80633a648b15116101ea57806351e80672116101ae57806351e806721461052a5780635f832177146105325780636bacff2c146105605780636e47a51a146105a85780636e47b482146105c857806374f079b8146105d057610269565b80633a648b15146104b6578063422f9050146104f257806343756e5c14610512578063493279b11461051a57806351b4dce31461052257610269565b806328087028116102315780632808702814610434578063299b533d1461043c5780632af6f399146104705780632ff32aea1461048d578063308325f4146104ae57610269565b80630e2374a51461026e57806314b3023b146102925780631d130935146102ac5780631e275ae1146102c857806322556cdc1461042c575b600080fd5b6102766108f1565b604080516001600160a01b039092168252519081900360200190f35b61029a6108f7565b60408051918252519081900360200190f35b6102b46108fd565b604080519115158252519081900360200190f35b61042a60048036036101008110156102df57600080fd5b81018160a081016080820135600160201b8111156102fc57600080fd5b82018360208201111561030e57600080fd5b803590602001918460018302840111600160201b8311171561032f57600080fd5b919390929091602081019035600160201b81111561034c57600080fd5b82018360208201111561035e57600080fd5b803590602001918460018302840111600160201b8311171561037f57600080fd5b919390929091602081019035600160201b81111561039c57600080fd5b8201836020820111156103ae57600080fd5b803590602001918460018302840111600160201b831117156103cf57600080fd5b919390929091602081019035600160201b8111156103ec57600080fd5b8201836020820111156103fe57600080fd5b803590602001918460018302840111600160201b8311171561041f57600080fd5b509092509050610906565b005b61029a610ba7565b610276610bac565b6104596004803603602081101561045257600080fd5b5035610bb2565b6040805161ffff9092168252519081900360200190f35b6102b46004803603602081101561048657600080fd5b5035610bc8565b610495610bdd565b60408051600792830b90920b8252519081900360200190f35b61029a610be6565b6104d6600480360360208110156104cc57600080fd5b503560ff16610bec565b604080516001600160401b039092168252519081900360200190f35b6102b46004803603602081101561050857600080fd5b503560ff16610c07565b610276610c1c565b610459610c22565b610276610c27565b610276610c2d565b61042a6004803603604081101561054857600080fd5b506001600160a01b0381358116916020013516610c33565b61057d6004803603602081101561057657600080fd5b5035610dac565b6040805161ffff90941684526001600160801b03909216602084015282820152519081900360600190f35b610276600480360360208110156105be57600080fd5b503560ff16610ddb565b610276610df6565b61029a610dfc565b610276610e02565b610276610e08565b61042a600480360360a08110156105fe57600080fd5b810190602081018135600160201b81111561061857600080fd5b82018360208201111561062a57600080fd5b803590602001918460018302840111600160201b8311171561064b57600080fd5b919390929091602081019035600160201b81111561066857600080fd5b82018360208201111561067a57600080fd5b803590602001918460018302840111600160201b8311171561069b57600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff16610e0e565b6102766111c2565b6102766111c8565b6102b46111ce565b6102766111d7565b6102766111dd565b6106f36111e3565b6040805163ffffffff9092168252519081900360200190f35b61042a6004803603604081101561072257600080fd5b810190602081018135600160201b81111561073c57600080fd5b82018360208201111561074e57600080fd5b803590602001918460018302840111600160201b8311171561076f57600080fd5b919390929091602081019035600160201b81111561078c57600080fd5b82018360208201111561079e57600080fd5b803590602001918460018302840111600160201b831117156107bf57600080fd5b5090925090506111e8565b6104d6600480360360208110156107e057600080fd5b503560ff16611228565b610276611243565b61042a611249565b6102b46004803603604081101561081057600080fd5b5080356001600160a01b0316906020013560ff16611409565b610276611429565b61027661142f565b61042a611435565b6104d66004803603602081101561085757600080fd5b503560ff166114c7565b61042a6114e2565b61042a6004803603606081101561087f57600080fd5b60ff8235169190810190604081016020820135600160201b8111156108a357600080fd5b8201836020820111156108b557600080fd5b803590602001918460018302840111600160201b831117156108d657600080fd5b91935091503561165b565b6102766116fd565b610276611703565b61200181565b60015481565b600b5460ff1681565b60005460ff1661094b576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b604080516337d7f9c160e21b81526001600160401b038b35166004820181905291516110039163df5fe704916024808301926020929190829003018186803b15801561099657600080fd5b505afa1580156109aa573d6000803e3d6000fd5b505050506040513d60208110156109c057600080fd5b50516109fd5760405162461bcd60e51b81526004018080602001828103825260238152602001806117896023913960400191505060405180910390fd5b604080516337d7f9c160e21b815260208c8101356001600160401b03166004830181905292516110039263df5fe704926024808301939192829003018186803b158015610a4957600080fd5b505afa158015610a5d573d6000803e3d6000fd5b505050506040513d6020811015610a7357600080fd5b5051610ab05760405162461bcd60e51b81526004018080602001828103825260238152602001806117896023913960400191505060405180910390fd5b60608b013560ff81166000908152600560205260409020546001600160401b03909116906001600160a01b0316610b29576040805162461bcd60e51b815260206004820152601860248201527718da185b9b995b081a5cc81b9bdd081cdd5c1c1bdc9d195960421b604482015290519081900360640190fd5b600b5460ff1615610b6d576040805162461bcd60e51b81526020600482015260096024820152681cdd5cdc195b99195960ba1b604482015290519081900360640190fd5b6040805162461bcd60e51b815260206004820152600a60248201526919195c1c9958d85d195960b21b604482015290519081900360640190fd5b603281565b61200581565b600d6020526000908152604090205461ffff1681565b600e6020526000908152604090205460ff1681565b60045460070b81565b60025481565b600a602052600090815260409020546001600160401b031681565b60096020526000908152604090205460ff1681565b61100181565b606181565b61200681565b61200081565b60005460ff16610c78576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b6040805163569e4ed360e11b815233600482015290516000916110009163ad3c9da691602480820192602092909190829003018186803b158015610cbb57600080fd5b505afa158015610ccf573d6000803e3d6000fd5b505050506040513d6020811015610ce557600080fd5b505160408051633d42651560e11b8152905191925060009161100091637a84ca2a916004808301926020929190829003018186803b158015610d2657600080fd5b505afa158015610d3a573d6000803e3d6000fd5b505050506040513d6020811015610d5057600080fd5b5051905080610d5d575060155b600082118015610d6d5750808211155b610b6d576040805162461bcd60e51b815260206004820152600b60248201526a1b9bdd0818d8589a5b995d60aa1b604482015290519081900360640190fd5b600c602052600090815260409020805460019091015461ffff8216916201000090046001600160801b03169083565b6005602052600090815260409020546001600160a01b031681565b61100581565b60035481565b61100881565b61200381565b60005460ff16610e53576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b158015610e9257600080fd5b505afa158015610ea6573d6000803e3d6000fd5b505050506040513d6020811015610ebc57600080fd5b5051610f0f576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610f7f576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610ff457600080fd5b505afa158015611008573d6000803e3d6000fd5b505050506040513d602081101561101e57600080fd5b505161105b5760405162461bcd60e51b81526004018080602001828103825260238152602001806117896023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b03166110c5576040805162461bcd60e51b815260206004820152601860248201527718da185b9b995b081a5cc81b9bdd081cdd5c1c1bdc9d195960421b604482015290519081900360640190fd5b60ff86166000908152600a6020526040902054889087906001600160401b03908116908316101561112e576040805162461bcd60e51b815260206004820152600e60248201526d3a37b79037b632103432b0b232b960911b604482015290519081900360640190fd5b60ff81166000908152600a60205260409020546001600160401b03838116911614610b295760ff8181166000908152600a60205260409020805467ffffffffffffffff19166001600160401b038516179055600b541615610b6d576040805162461bcd60e51b81526020600482015260096024820152681cdd5cdc195b99195960ba1b604482015290519081900360640190fd5b61100781565b61100681565b60005460ff1681565b61200281565b61300081565b600081565b3361100714610b295760405162461bcd60e51b815260040180806020018281038252602e81526020018061173b602e913960400191505060405180910390fd5b6008602052600090815260409020546001600160401b031681565b61100281565b60005460ff1661128e576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b6040805163569e4ed360e11b815233600482015290516000916110009163ad3c9da691602480820192602092909190829003018186803b1580156112d157600080fd5b505afa1580156112e5573d6000803e3d6000fd5b505050506040513d60208110156112fb57600080fd5b505160408051633d42651560e11b8152905191925060009161100091637a84ca2a916004808301926020929190829003018186803b15801561133c57600080fd5b505afa158015611350573d6000803e3d6000fd5b505050506040513d602081101561136657600080fd5b5051905080611373575060155b6000821180156113835750808211155b6113c2576040805162461bcd60e51b815260206004820152600b60248201526a1b9bdd0818d8589a5b995d60aa1b604482015290519081900360640190fd5b600b5460ff16610b6d576040805162461bcd60e51b815260206004820152600d60248201526c1b9bdd081cdd5cdc195b991959609a1b604482015290519081900360640190fd5b600660209081526000928352604080842090915290825290205460ff1681565b61100381565b61200481565b60005460ff161561148d576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b603260019081556004805467ffffffffffffffff19166001600160401b03179055600060028190556003819055805460ff19169091179055565b6007602052600090815260409020546001600160401b031681565b60005460ff16611527576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b6040805163569e4ed360e11b815233600482015290516000916110009163ad3c9da691602480820192602092909190829003018186803b15801561156a57600080fd5b505afa15801561157e573d6000803e3d6000fd5b505050506040513d602081101561159457600080fd5b505160408051633d42651560e11b8152905191925060009161100091637a84ca2a916004808301926020929190829003018186803b1580156115d557600080fd5b505afa1580156115e9573d6000803e3d6000fd5b505050506040513d60208110156115ff57600080fd5b505190508061160c575060155b60008211801561161c5750808211155b610b29576040805162461bcd60e51b815260206004820152600b60248201526a1b9bdd0818d8589a5b995d60aa1b604482015290519081900360640190fd5b60005460ff166116a0576040805162461bcd60e51b81526020600482015260196024820152600080516020611769833981519152604482015290519081900360640190fd5b33600090815260066020908152604080832060ff8089168552925290912054859116610b6d5760405162461bcd60e51b815260040180806020018281038252603181526020018061170a6031913960400191505060405180910390fd5b61100081565b6110048156fe74686520636f6e747261637420616e64206368616e6e656c2068617665206e6f74206265656e2072656769737465726564746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e747261637474686520636f6e7472616374206e6f7420696e697420796574000000000000006c6967687420636c69656e74206e6f742073796e632074686520626c6f636b20796574a164736f6c6343000604000a
Loading
Loading