diff --git a/core/tx_pool.go b/core/tx_pool.go index 37233b74f..40dc97bda 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -565,7 +565,8 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { return ErrInvalidGasPrice } // Heuristic limit, reject transactions over 32KB to prevent DOS attacks - if tx.Size() > 32*1024 { + // UPDATED to 64KB to support the deployment of bigger contract due to the pressing need for sophisticated/complex contract in financial/capital markets - Nathan Aw + if tx.Size() > 64*1024 { return ErrOversizedData } // Transactions can't be negative. This may never happen using RLP decoded diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go index 1858abeb0..45330f047 100644 --- a/core/tx_pool_test.go +++ b/core/tx_pool_test.go @@ -278,8 +278,8 @@ func TestInvalidTransactions(t *testing.T) { t.Error("expected", ErrGasLimit, "; got", err) } - data := make([]byte, (32*1024)+1) - tx2, _ := types.SignTx(types.NewTransaction(2, common.Address{}, big.NewInt(100),100000, big.NewInt(1), data), types.HomesteadSigner{}, key) + data := make([]byte, (64*1024)+1) + tx2, _ := types.SignTx(types.NewTransaction(2, common.Address{}, big.NewInt(100), big.NewInt(100000), big.NewInt(1), data), types.HomesteadSigner{}, key) if err := pool.AddRemote(tx2); err != ErrOversizedData { t.Error("expected", ErrOversizedData, "; got", err) } diff --git a/miner/worker.go b/miner/worker.go index d6450f8bd..60ba40313 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -344,6 +344,17 @@ func (self *worker) wait() { log.Error("Failed writWriteBlockAndStating block to chain", "err", err) continue } + + if err := core.WritePrivateBlockBloom(self.chainDb, block.NumberU64(), work.privateReceipts); err != nil { + log.Error("Failed writing private block bloom", "err", err) + continue + } + + // check if canon block and write transactions + if stat == core.CanonStatTy { + // implicit by posting ChainHeadEvent + mustCommitNewWork = false + } // Broadcast the block and announce chain insertion event self.mux.Post(core.NewMinedBlockEvent{Block: block}) var ( diff --git a/p2p/permissions.go b/p2p/permissions.go index 3cbacb2bc..824bb110a 100644 --- a/p2p/permissions.go +++ b/p2p/permissions.go @@ -30,7 +30,6 @@ func isNodePermissioned(nodename string, currentNode string, datadir string, dir log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "ALLOWED-BY", currentNode[:NODE_NAME_LENGTH]) return true } - log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "DENIED-BY", currentNode[:NODE_NAME_LENGTH]) } log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "DENIED-BY", currentNode[:NODE_NAME_LENGTH]) return false