Skip to content

Commit

Permalink
Merge branch 'develop' into Implementation-of-the-Accounts-and-GetPro…
Browse files Browse the repository at this point in the history
…of-methods
  • Loading branch information
novosandara committed Aug 6, 2024
2 parents 81f1638 + 6546989 commit 4af7fb3
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 115 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ jobs:
sed 's/log_level: .*/log_level: ${{ vars.LOG_LEVEL }}/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/epoch_reward: .*/epoch_reward: 1000000000/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/reward_wallet_balance: .*/reward_wallet_balance: 0xD3C21BCECCEDA1000000/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/config_socket: .*/config_socket: ${{ vars.CONFIG_SOCKET }}/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
- name: Setup Ansible
working-directory: ansible
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
max_enqueued: "20000000"
is_london_fork_active: true
is_bridge_active: false
gossip_msg_size: "8388608"
gossip_msg_size: "16777216"
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
max_enqueued: "20000000"
is_london_fork_active: true
is_bridge_active: false
gossip_msg_size: "8388608"
gossip_msg_size: "16777216"
logs: true
build_blade_output: ${{ needs.ci.outputs.build_blade }}
lint_output: ${{ needs.ci.outputs.lint }}
Expand Down
10 changes: 0 additions & 10 deletions consensus/polybft/consensus_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,16 +902,6 @@ func (c *consensusRuntime) BuildPrePrepareMessage(
certificate *proto.RoundChangeCertificate,
view *proto.View,
) *proto.IbftMessage {
// Add debug log for cases when RCC is not nil
if certificate != nil {
c.logger.Debug("BuildPrePrepareMessage", "rawProposal length", len(rawProposal),
"certificate length", len(certificate.String()))

for i, rcMsg := range certificate.RoundChangeMessages {
c.logger.Debug("BuildPrePrepareMessage", "RC msg index", i, "RC msg length", len(rcMsg.String()))
}
}

if len(rawProposal) == 0 {
c.logger.Error("can not build pre-prepare message, since proposal is empty")

Expand Down
5 changes: 1 addition & 4 deletions crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ func Sign(priv *ecdsa.PrivateKey, hash []byte) ([]byte, error) {

defer btcPrivKey.Zero()

sig, err := btc_ecdsa.SignCompact(btcPrivKey, hash, false)
if err != nil {
return nil, err
}
sig := btc_ecdsa.SignCompact(btcPrivKey, hash, false)

// Convert to Ethereum signature format with 'recovery id' v at the end.
v := sig[0] - recoveryID
Expand Down
8 changes: 5 additions & 3 deletions gasprice/gasprice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
func TestGasHelper_MaxPriorityFeePerGas(t *testing.T) {
t.Parallel()

defaultGasPrice := DefaultGasHelperConfig.LastPrice

var cases = []struct {
Name string
Expected *big.Int
Expand Down Expand Up @@ -118,7 +120,7 @@ func TestGasHelper_MaxPriorityFeePerGas(t *testing.T) {
{
Name: "Number of blocks in chain smaller than numOfBlocksToCheck",
Expected: DefaultGasHelperConfig.LastPrice.Mul(
DefaultGasHelperConfig.LastPrice, big.NewInt(2)), // at least two times of default last price
defaultGasPrice, big.NewInt(2)), // at least two times of default last price
GetBackend: func() Blockchain {
backend := createTestBlocks(t, 10)
createTestTxs(t, backend, 3, 200)
Expand All @@ -129,7 +131,7 @@ func TestGasHelper_MaxPriorityFeePerGas(t *testing.T) {
{
Name: "Number of blocks in chain higher than numOfBlocksToCheck",
Expected: DefaultGasHelperConfig.LastPrice.Mul(
DefaultGasHelperConfig.LastPrice, big.NewInt(2)), // at least two times of default last price
defaultGasPrice, big.NewInt(2)), // at least two times of default last price
GetBackend: func() Blockchain {
backend := createTestBlocks(t, 30)
createTestTxs(t, backend, 3, 200)
Expand All @@ -140,7 +142,7 @@ func TestGasHelper_MaxPriorityFeePerGas(t *testing.T) {
{
Name: "Not enough transactions in first 20 blocks, so read some more blocks",
Expected: DefaultGasHelperConfig.LastPrice.Mul(
DefaultGasHelperConfig.LastPrice, big.NewInt(2)), // at least two times of default last price
defaultGasPrice, big.NewInt(2)), // at least two times of default last price
GetBackend: func() Blockchain {
backend := createTestBlocks(t, 50)
createTestTxs(t, backend, 1, 200)
Expand Down
63 changes: 30 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ module github.com/0xPolygon/polygon-edge
go 1.21

require (
cloud.google.com/go/secretmanager v1.13.3
cloud.google.com/go/secretmanager v1.13.5
github.com/0xPolygon/go-ibft v0.4.1-0.20240621090555-e81a63ff50d7
github.com/Ethernal-Tech/blockchain-event-tracker v0.0.0-20240628125004-67308570b6e2
github.com/Ethernal-Tech/ethgo v0.0.0-20240628122946-b6b88f4f501d
github.com/Ethernal-Tech/ethgo v0.0.0-20240801172627-47215d9e504c
github.com/Ethernal-Tech/merkle-tree v0.0.0-20231213143318-4db9da419e04
github.com/armon/go-metrics v0.4.1
github.com/aws/aws-sdk-go v1.54.12
github.com/btcsuite/btcd/btcec/v2 v2.3.3
github.com/docker/docker v27.0.3+incompatible
github.com/aws/aws-sdk-go v1.55.5
github.com/btcsuite/btcd/btcec/v2 v2.3.4
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-connections v0.5.0
github.com/envoyproxy/protoc-gen-validate v1.0.4
github.com/erigontech/mdbx-go v0.38.4
Expand All @@ -24,7 +24,7 @@ require (
github.com/hashicorp/golang-lru v1.0.2
github.com/hashicorp/hcl v1.0.1-vault-5
github.com/hashicorp/vault/api v1.14.0
github.com/holiman/uint256 v1.2.4
github.com/holiman/uint256 v1.3.1
github.com/json-iterator/go v1.1.12
github.com/libp2p/go-libp2p v0.35.1
github.com/libp2p/go-libp2p-kbucket v0.6.3
Expand All @@ -35,8 +35,8 @@ require (
github.com/quasilyte/go-ruleguard v0.4.2
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/schollz/progressbar/v3 v3.14.4
github.com/sethvargo/go-retry v0.2.4
github.com/schollz/progressbar/v3 v3.14.5
github.com/sethvargo/go-retry v0.3.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
Expand All @@ -45,33 +45,29 @@ require (
github.com/umbracle/go-eth-bn256 v0.0.0-20230125114011-47cb310d9b0b
github.com/valyala/fastjson v1.6.4
go.etcd.io/bbolt v1.3.10
golang.org/x/crypto v0.24.0
golang.org/x/crypto v0.25.0
golang.org/x/sync v0.7.0
golang.org/x/tools v0.22.0
google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d
google.golang.org/grpc v1.64.1
golang.org/x/tools v0.23.0
google.golang.org/genproto v0.0.0-20240722135656-d784300faade
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/DataDog/dd-trace-go.v1 v1.65.1
gopkg.in/DataDog/dd-trace-go.v1 v1.66.0
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
gopkg.in/yaml.v3 v3.0.1
pgregory.net/rapid v1.1.0
)

require (
github.com/DataDog/go-libddwaf/v3 v3.2.1 // indirect
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20240503222823-736c933a666d // indirect
)

require (
cloud.google.com/go/auth v0.6.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/iam v1.1.8 // indirect
cloud.google.com/go/auth v0.7.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.10 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/DataDog/appsec-internal-go v1.6.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect
github.com/DataDog/go-libddwaf/v3 v3.2.1 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/gostackparse v0.7.0 // indirect
github.com/DataDog/sketches-go v1.4.5 // indirect
Expand All @@ -85,7 +81,7 @@ require (
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/continuity v0.4.3 // indirect
github.com/containerd/log v0.1.0 // indirect
Expand All @@ -104,7 +100,7 @@ require (
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-toolsmith/astcopy v1.0.2 // indirect
Expand All @@ -118,7 +114,7 @@ require (
github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
Expand All @@ -128,6 +124,7 @@ require (
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20240503222823-736c933a666d // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/boxo v0.8.1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
Expand Down Expand Up @@ -240,17 +237,17 @@ require (
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/exp/typeparams v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.187.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.189.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240722135656-d784300faade // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect
gotest.tools/v3 v3.0.2 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
)
Loading

0 comments on commit 4af7fb3

Please sign in to comment.