Skip to content

Commit

Permalink
Merge branch 'qena' into qena-rpc-total_unstaked_per_cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
huancheng-trili committed Oct 3, 2024
2 parents a70eba2 + 0b33bdc commit 3e0a708
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 39 deletions.
35 changes: 8 additions & 27 deletions tezos/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,32 @@ var (
// either overwrite this default or set custom params per operation using
// op.WithParams().
DefaultParams = (&Params{
MinimalBlockDelay: 10 * time.Second,
MinimalBlockDelay: 8 * time.Second,
CostPerByte: 250,
OriginationSize: 257,
HardGasLimitPerOperation: 1040000,
HardGasLimitPerBlock: 1733333,
HardGasLimitPerBlock: 1386666,
HardStorageLimitPerOperation: 60000,
MaxOperationDataLength: 32768,
MaxOperationsTTL: 360,
MaxOperationsTTL: 450,
}).
WithChainId(Mainnet).
WithDeployment(Deployments[Mainnet].AtProtocol(ProtoV019))
WithDeployment(Deployments[Mainnet].AtProtocol(ProtoV021))

// GhostnetParams defines the blockchain configuration for Ghostnet testnet.
// To produce compliant transactions, use these defaults in op.WithParams().
GhostnetParams = (&Params{
MinimalBlockDelay: 8 * time.Second,
CostPerByte: 250,
OriginationSize: 257,
HardGasLimitPerOperation: 1040000,
HardGasLimitPerBlock: 1733333,
HardStorageLimitPerOperation: 60000,
MaxOperationDataLength: 32768,
MaxOperationsTTL: 360,
}).
WithChainId(Ghostnet).
WithDeployment(Deployments[Ghostnet].AtProtocol(ProtoV019))

// ParisnetParams defines the blockchain configuration for Paris testnet.
// To produce compliant transactions, use these defaults in op.WithParams().
ParisnetParams = (&Params{
MinimalBlockDelay: 5 * time.Second,
CostPerByte: 250,
OriginationSize: 257,
HardGasLimitPerOperation: 1040000,
HardGasLimitPerBlock: 1733333,
HardGasLimitPerBlock: 1386666,
HardStorageLimitPerOperation: 60000,
MaxOperationDataLength: 32768,
MaxOperationsTTL: 360,
MaxOperationsTTL: 450,
}).
WithChainId(Parisnet).
WithDeployment(Deployments[Parisnet].AtProtocol(ProtoV019))
WithChainId(Ghostnet).
WithDeployment(Deployments[Ghostnet].AtProtocol(ProtoV021))
)

// Params contains a subset of protocol configuration settings that are relevant
Expand Down Expand Up @@ -111,10 +96,6 @@ func (p *Params) WithChainId(id ChainIdHash) *Params {
p.Network = "Mainnet"
case Ghostnet:
p.Network = "Ghostnet"
case Parisnet:
p.Network = "Parisnet"
case ParisCnet:
p.Network = "ParisCnet"
}
}
return p
Expand Down
18 changes: 6 additions & 12 deletions tezos/protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (
ProtoV018 = MustParseProtocolHash("ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH")
ProtoV019 = MustParseProtocolHash("PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ")
ProtoV020 = MustParseProtocolHash("PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi")
ProtoV021 = MustParseProtocolHash("PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT")
ProtoV021 = MustParseProtocolHash("PtQenaB1PqFEfTe2og7bZTaPvMw2CxRyDFEwWNj3GiWp9ba4bJd")

// aliases
PtAthens = ProtoV004
Expand All @@ -49,11 +49,10 @@ var (
Proxford = ProtoV018
PtParisB = ProtoV019
PsParisC = ProtoV020
PsQuebec = ProtoV021
PtQenaB1 = ProtoV021

Mainnet = MustParseChainIdHash("NetXdQprcVkpaWU")
Ghostnet = MustParseChainIdHash("NetXnHfVqm9iesp")
ParisCnet = MustParseChainIdHash("NetXXWAHLEvre9b")
Mainnet = MustParseChainIdHash("NetXdQprcVkpaWU")
Ghostnet = MustParseChainIdHash("NetXnHfVqm9iesp")

versionsMtx = sync.RWMutex{}
Versions = map[ProtocolHash]int{
Expand Down Expand Up @@ -107,7 +106,7 @@ var (
{Proxford, 0, 5070849, 5726208, 703, 5, 16384, 1024}, // v18
{PtParisB, 0, 5726209, 5898240, 743, 2, 24576, 24576}, // v19
{PsParisC, 0, 5898241, -1, 750, 2, 24576, 24576}, // v20
{PsQuebec, 0, 5898241, -1, 750, 2, 30720, 30720}, // v21
{PtQenaB1, 0, 5898241, -1, 750, 2, 30720, 30720}, // v21
},
Ghostnet: {
{ProtoGenesis, 0, 0, 0, 0, 3, 4096, 256}, // 0
Expand All @@ -122,12 +121,7 @@ var (
{Proxford, 0, 5316609, 6422528, 913, 3, 8192, 512}, // v18
{PtParisB, 0, 6422529, 6729728, 1048, 2, 12288, 12288}, // v19
{PsParisC, 0, 6729729, -1, 1073, 2, 12288, 12288}, // v20
{PsQuebec, 0, 5898241, -1, 750, 2, 30720, 30720}, // v21
},
ParisCnet: {
{ProtoGenesis, 0, 0, 0, 0, 3, 8192, 512}, // 0
{ProtoBootstrap, 0, 1, 1, 0, 3, 8192, 512}, // 0
{PsParisC, 2, 2, -1, 0, 2, 128, 128}, // v19
{PtQenaB1, 0, 5898241, -1, 750, 2, 30720, 30720}, // v21
},
}
)
Expand Down

0 comments on commit 3e0a708

Please sign in to comment.