good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit ef80fd54 authored by Igor Mandrigin's avatar Igor Mandrigin Committed by GitHub
Browse files

Merge pull request #2760 from ledgerwatch/stable-2021-10-01

Stable 2021 10 01
parents 4f20cf9a e19dcd89
No related branches found
Tags v2021.10.01
No related merge requests found
......@@ -96,7 +96,7 @@ func RootCommand() (*cobra.Command, *Flags) {
rootCmd.PersistentFlags().UintVar(&cfg.RpcBatchConcurrency, "rpc.batch.concurrency", 50, "Does limit amount of goroutines to process 1 batch request. Means 1 bach request can't overload server. 1 batch still can have unlimited amount of request")
rootCmd.PersistentFlags().BoolVar(&cfg.TraceCompatibility, "trace.compat", false, "Bug for bug compatibility with OE for trace_ routines")
rootCmd.PersistentFlags().BoolVar(&cfg.TxPoolV2, "txpool.v2", false, "experimental external txpool")
rootCmd.PersistentFlags().StringVar(&cfg.TxPoolApiAddr, "txpool.api.addr", "127.0.0.1:9090", "txpool api network address, for example: 127.0.0.1:9090")
rootCmd.PersistentFlags().StringVar(&cfg.TxPoolApiAddr, "txpool.api.addr", "127.0.0.1:9094", "txpool api network address, for example: 127.0.0.1:9094")
if err := rootCmd.MarkPersistentFlagFilename("rpc.accessList", "json"); err != nil {
panic(err)
......@@ -239,9 +239,9 @@ func RemoteServices(ctx context.Context, cfg Flags, logger log.Logger, rootCance
}
db = rwKv
stateCache = kvcache.NewDummy()
return db, eth, txPool, mining, stateCache, nil
} else {
log.Info("if you run RPCDaemon on same machine with Erigon add --datadir option")
}
log.Info("if you run RPCDaemon on same machine with Erigon add --datadir option")
if cfg.PrivateApiAddr == "" {
return db, eth, txPool, mining, stateCache, nil
......
......@@ -39,6 +39,9 @@ func (api *APIImpl) GetFilterChanges(_ context.Context, index hexutil.Uint64) ([
// NewHeads send a notification each time a new (header) block is appended to the chain.
func (api *APIImpl) NewHeads(ctx context.Context) (*rpc.Subscription, error) {
if api.filters == nil {
return &rpc.Subscription{}, rpc.ErrNotificationsUnsupported
}
notifier, supported := rpc.NotifierFromContext(ctx)
if !supported {
return &rpc.Subscription{}, rpc.ErrNotificationsUnsupported
......@@ -71,6 +74,9 @@ func (api *APIImpl) NewHeads(ctx context.Context) (*rpc.Subscription, error) {
// NewPendingTransactions send a notification each time a new (header) block is appended to the chain.
func (api *APIImpl) NewPendingTransactions(ctx context.Context) (*rpc.Subscription, error) {
if api.filters == nil {
return &rpc.Subscription{}, rpc.ErrNotificationsUnsupported
}
notifier, supported := rpc.NotifierFromContext(ctx)
if !supported {
return &rpc.Subscription{}, rpc.ErrNotificationsUnsupported
......
......@@ -6,7 +6,8 @@ Has 2 modes: internal and external
## Internal mode
Works inside Erigon: add `--txpool.v2` flags to Erigon, and `--txpool.v2` flag to RPCDaemon
Works inside Erigon: add `--txpool.v2` flags to Erigon, and `--txpool.v2 --txpool.api.addr localhost:9090` flags to
RPCDaemon
## External mode
......
......@@ -553,7 +553,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
createDataGas := uint64(len(ret)) * params.CreateDataGas
if contract.UseGas(createDataGas) {
evm.IntraBlockState.SetCode(address, ret)
} else {
} else if evm.ChainRules.IsHomestead {
err = ErrCodeStoreOutOfGas
}
}
......
......@@ -129,7 +129,7 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, unwindT
if err != nil {
return err
}
notifyFrom := finishStageBeforeSync + 1
notifyFrom := finishStageBeforeSync
if unwindTo != nil && *unwindTo != 0 && (*unwindTo) < finishStageBeforeSync {
notifyFrom = *unwindTo + 1
}
......@@ -137,7 +137,7 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, unwindT
log.Warn("rpc notifier is not set, rpc daemon won't be updated about headers")
return nil
}
log.Info("Update current block for the RPC API", "from", notifyFrom, "to", notifyTo)
for i := notifyFrom; i <= notifyTo; i++ {
header := rawdb.ReadHeaderByNumber(tx, i)
if header == nil {
......@@ -145,5 +145,8 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, unwindT
}
notifier.OnNewHeader(header)
}
log.Info("Updated current block for the RPC API", "from", notifyFrom, "to", notifyTo)
return nil
}
......@@ -32,8 +32,8 @@ var (
// see https://calver.org
const (
VersionMajor = 2021 // Major version component of the current release
VersionMinor = 9 // Minor version component of the current release
VersionMicro = 5 // Patch version component of the current release
VersionMinor = 10 // Minor version component of the current release
VersionMicro = 1 // Patch version component of the current release
VersionModifier = "alpha" // Patch version component of the current release
VersionKeyCreated = "ErigonVersionCreated"
VersionKeyFinished = "ErigonVersionFinished"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment