Skip to content

Commit

Permalink
Update trusted checkpoint on Devin (#463)
Browse files Browse the repository at this point in the history
* Added checks for addresses and txs. Skipping dev address and bad tx hash (#460)

* Added checks for addresses and txs. Skipping dev address and bad tx hash

* skip ZeroNetworkIDTxHash in block validator

* new devin genesis preallocation

* fix tests

* add new address to devin alloc (#462)

* add new address to devin alloc

* fix tests

* update trusted checkpoint

* fix devin genesis (#464)

* fix xcbkey networkID flag (#467)
  • Loading branch information
error2215 authored Oct 19, 2023
1 parent 32d1a3d commit 41c152f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmd/xcbkey/changepassword.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Change the password of a keyfile.`,
keyfilepath := ctx.Args().First()

if ctx.IsSet(utils.NetworkIdFlag.Name) {
common.DefaultNetworkID = common.NetworkID(ctx.GlobalUint64(utils.NetworkIdFlag.Name))
common.DefaultNetworkID = common.NetworkID(ctx.Uint64(utils.NetworkIdFlag.Name))
}
// Read key from file.
keyjson, err := ioutil.ReadFile(keyfilepath)
Expand Down
2 changes: 1 addition & 1 deletion cmd/xcbkey/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If you want to encrypt an existing private key, it can be specified by setting
},
Action: func(ctx *cli.Context) error {
if ctx.IsSet(utils.NetworkIdFlag.Name) {
common.DefaultNetworkID = common.NetworkID(ctx.GlobalUint64(utils.NetworkIdFlag.Name))
common.DefaultNetworkID = common.NetworkID(ctx.Uint64(utils.NetworkIdFlag.Name))
}

// Check if keyfile path given and make sure it doesn't already exist.
Expand Down
2 changes: 1 addition & 1 deletion cmd/xcbkey/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ make sure to use this feature with great caution!`,
},
Action: func(ctx *cli.Context) error {
if ctx.IsSet(utils.NetworkIdFlag.Name) {
common.DefaultNetworkID = common.NetworkID(ctx.GlobalUint64(utils.NetworkIdFlag.Name))
common.DefaultNetworkID = common.NetworkID(ctx.Uint64(utils.NetworkIdFlag.Name))
}

keyfilepath := ctx.Args().First()
Expand Down
4 changes: 2 additions & 2 deletions cmd/xcbkey/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To sign a message contained in a file, use the --msgfile flag.
},
Action: func(ctx *cli.Context) error {
if ctx.IsSet(utils.NetworkIdFlag.Name) {
common.DefaultNetworkID = common.NetworkID(ctx.GlobalUint64(utils.NetworkIdFlag.Name))
common.DefaultNetworkID = common.NetworkID(ctx.Uint64(utils.NetworkIdFlag.Name))
}

message := getMessage(ctx, 1)
Expand Down Expand Up @@ -108,7 +108,7 @@ It is possible to refer to a file containing the message.`,
},
Action: func(ctx *cli.Context) error {
if ctx.IsSet(utils.NetworkIdFlag.Name) {
common.DefaultNetworkID = common.NetworkID(ctx.GlobalUint64(utils.NetworkIdFlag.Name))
common.DefaultNetworkID = common.NetworkID(ctx.Uint64(utils.NetworkIdFlag.Name))
}

addressStr := ctx.Args().First()
Expand Down
2 changes: 1 addition & 1 deletion core/forkid/forkid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestCreation(t *testing.T) {
params.DevinChainConfig,
params.DevinGenesisHash,
[]testcase{
{10, ID{Hash: checksumToBytes(0xcdc46664), Next: 0}},
{10, ID{Hash: checksumToBytes(0xed0aff6a), Next: 0}},
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ func DefaultDevinGenesisBlock() *Genesis {
return &Genesis{
Coinbase: DefaultCoinbaseDevin,
Config: params.DevinChainConfig,
Difficulty: big.NewInt(1000000),
Timestamp: 1651833293,
Difficulty: big.NewInt(32000),
Timestamp: 1696411912,
Nonce: 0x000000000003,
EnergyLimit: 14700000,
Alloc: decodePrealloc(devinAllocData),
Expand Down
2 changes: 1 addition & 1 deletion core/genesis_alloc.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// Genesis hashes to enforce below configs on.
var (
MainnetGenesisHash = common.HexToHash("0xacecc18e30188588d4932a29df096198bbbe01a955f05ecd32489a7740a9a13b")
DevinGenesisHash = common.HexToHash("0x75819f1f5186624bdc0a8dbec59658f87c99447c56af69624dec59a24c4ac18e")
DevinGenesisHash = common.HexToHash("0x2a92b248f5843827cbbd5045161cd6f294a154505ee1a14b607a2c26ffc6fddf")
)

// TrustedCheckpoints associates each known checkpoint with the genesis hash of
Expand Down Expand Up @@ -74,9 +74,9 @@ var (

// DevinTrustedCheckpoint contains the light client trusted checkpoint for the Devin test network.
DevinTrustedCheckpoint = &TrustedCheckpoint{
SectionIndex: 131,
SectionHead: common.HexToHash("0xbfb8e778c05b7fb6aa934059cfe488a406f1d23525a149ba5de1854e5e8cf574"),
CHTRoot: common.HexToHash("0x8851b783355fff515505af9559b29bddb72c410409b8292e41745834975cf6df"),
SectionIndex: 0,
SectionHead: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
CHTRoot: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
BloomRoot: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
}

Expand Down

0 comments on commit 41c152f

Please sign in to comment.