1. 10 8月, 2021 1 次提交
  2. 09 7月, 2021 1 次提交
  3. 06 7月, 2021 1 次提交
  4. 30 6月, 2021 1 次提交
  5. 28 6月, 2021 1 次提交
    • F
      eth/gasprice: implement feeHistory API (#23033) · 35dbf7a8
      Felföldi Zsolt 提交于
      * eth/gasprice: implement feeHistory API
      
      * eth/gasprice: factored out resolveBlockRange
      
      * eth/gasprice: add sanity check for missing block
      
      * eth/gasprice: fetch actual gas used from receipts
      
      * miner, eth/gasprice: add PendingBlockAndReceipts
      
      * internal/ethapi: use hexutil.Big
      
      * eth/gasprice: return error when requesting beyond head block
      
      * eth/gasprice: fixed tests and return errors correctly
      
      * eth/gasprice: rename receiver name
      
      * eth/gasprice: return directly if blockCount == 0
      Co-authored-by: Nrjl493456442 <garyrong0905@gmail.com>
      35dbf7a8
  6. 08 6月, 2021 1 次提交
  7. 04 6月, 2021 1 次提交
  8. 21 5月, 2021 1 次提交
    • M
      EIP-1559: miner changes (#22896) · a6c46278
      Martin Holst Swende 提交于
      * core/types, miner: create TxWithMinerFee wrapper, add EIP-1559 support to TransactionsByMinerFeeAndNonce
      
      miner: set base fee when creating a new header, handle gas limit, log miner fees
      
      * all: rename to NewTransactionsByPriceAndNonce
      
      * core/types, miner: rename to NewTransactionsByPriceAndNonce + EffectiveTip
      
      miner: activate 1559 for testGenerateBlockAndImport tests
      
      * core,miner: revert naming to TransactionsByPriceAndTime
      
      * core/types/transaction: update effective tip calculation logic
      
      * miner: update aleut to london
      
      * core/types/transaction_test: use correct signer for 1559 txs + add back sender check
      
      * miner/worker: calculate gas target from gas limit
      
      * core, miner: fix block  gas limits for 1559
      Co-authored-by: NAnsgar Dietrichs <adietrichs@gmail.com>
      Co-authored-by: Nlightclient@protonmail.com <lightclient@protonmail.com>
      a6c46278
  9. 25 2月, 2021 1 次提交
    • L
      all: add support for EIP-2718, EIP-2930 transactions (#21502) · bbfb1e40
      lightclient 提交于
      This adds support for EIP-2718 typed transactions as well as EIP-2930
      access list transactions (tx type 1). These EIPs are scheduled for the
      Berlin fork.
      
      There very few changes to existing APIs in core/types, and several new APIs
      to deal with access list transactions. In particular, there are two new
      constructor functions for transactions: types.NewTx and types.SignNewTx.
      Since the canonical encoding of typed transactions is not RLP-compatible,
      Transaction now has new methods for encoding and decoding: MarshalBinary
      and UnmarshalBinary.
      
      The existing EIP-155 signer does not support the new transaction types.
      All code dealing with transaction signatures should be updated to use the
      newer EIP-2930 signer. To make this easier for future updates, we have
      added new constructor functions for types.Signer: types.LatestSigner and
      types.LatestSignerForChainID. 
      
      This change also adds support for the YoloV3 testnet.
      Co-authored-by: NMartin Holst Swende <martin@swende.se>
      Co-authored-by: NFelix Lange <fjl@twurst.com>
      Co-authored-by: NRyan Schneider <ryanleeschneider@gmail.com>
      bbfb1e40
  10. 02 2月, 2021 1 次提交
  11. 21 1月, 2021 1 次提交
  12. 05 1月, 2021 1 次提交
    • M
      miner: avoid sleeping in miner (#22108) · 9584f56b
      Martin Holst Swende 提交于
      This PR removes a logic in the miner, which was originally intended to help temporary testnets based on ethash from "running off into the future". If the difficulty was low, and a few computers started mining several blocks per second, the ethash rules (which demand 1s delay between blocks) would push the blocktimes further and further away.
      The solution was to make the miner sleep while this happened.
      
      Nowadays, this problem is solved instead by PoA chains, and it's recommended to let testnets and devnets be based on clique instead. The existing logic is problematic, since it can cause stalls within the miner making it difficult for remote workers to submit work if the channel is blocked on a sleep.
      
      Credits to Saar Tochner for reporting this via the bug bounty
      9584f56b
  13. 11 12月, 2020 1 次提交
    • L
      miner, test: fix potential goroutine leak (#21989) · 62dc59c2
      lzhfromustc 提交于
      In miner/worker.go, there are two goroutine using channel w.newWorkCh: newWorkerLoop() sends to this channel, and mainLoop() receives from this channel. Only the receive operation is in a select.
      
      However, w.exitCh may be closed by another goroutine. This is fine for the receive since receive is in select, but if the send operation is blocking, then it will block forever. This commit puts the send in a select, so it won't block even if w.exitCh is closed.
      
      Similarly, there are two goroutines using channel errc: the parent that runs the test receives from it, and the child created at line 573 sends to it. If the parent goroutine exits too early by calling t.Fatalf() at line 614, then the child goroutine will be blocked at line 574 forever. This commit adds 1 buffer to errc. Now send will not block, and receive is not influenced because receive still needs to wait for the send.
      62dc59c2
  14. 04 12月, 2020 1 次提交
    • M
      core: improve contextual information on core errors (#21869) · 7770e41c
      Martin Holst Swende 提交于
      A lot of times when we hit 'core' errors, example: invalid tx, the information provided is
      insufficient. We miss several pieces of information: what account has nonce too high,
      and what transaction in that block was offending?
      
      This PR adds that information, using the new type of wrapped errors.
      It also adds a testcase which (partly) verifies the output from the errors.
      
      The first commit changes all usage of direct equality-checks on core errors, into
      using errors.Is. The second commit adds contextual information. This wraps most
      of the core errors with more information, and also wraps it one more time in
      stateprocessor, to further provide tx index and tx hash, if such a tx is encoutered in
      a block. The third commit uses the chainmaker to try to generate chains with such
      errors in them, thus triggering the errors and checking that the generated string meets
      expectations.
      7770e41c
  15. 11 9月, 2020 1 次提交
  16. 21 8月, 2020 1 次提交
  17. 29 7月, 2020 1 次提交
  18. 12 5月, 2020 1 次提交
  19. 02 4月, 2020 1 次提交
  20. 10 12月, 2019 1 次提交
  21. 29 11月, 2019 1 次提交
    • G
      core, miner: remove PostChainEvents (#19396) · fc7e0fe6
      gary rong 提交于
      This change:
      
      - removes the PostChainEvents method on core.BlockChain.
      - sorts 'removed log' events by block number.
      - fire the NewChainHead event if we inject a canonical block into the chain
        even if the entire insertion is not successful.
      - guarantees correct event ordering in all cases.
      fc7e0fe6
  22. 20 11月, 2019 1 次提交
  23. 13 9月, 2019 1 次提交
  24. 19 6月, 2019 1 次提交
  25. 30 4月, 2019 1 次提交
  26. 23 4月, 2019 1 次提交
    • G
      miner: polish miner configuration (#19480) · 6269e557
      gary rong 提交于
      * cmd, eth, miner: disable advance sealing if user require
      
      * cmd, console, miner, les, eth: wrap the miner config
      
      * eth: remove todo
      
      * cmd, miner: revert noadvance flag
      
      The reason for this is: if the transaction execution is even longer
      than block time, then this kind of transactions is DoS attack.
      6269e557
  27. 03 4月, 2019 1 次提交
    • M
      all: simplify timestamps to uint64 (#19372) · 0b4fe8d1
      Martin Holst Swende 提交于
      * all: simplify timestamps to uint64
      
      * tests: update definitions
      
      * clef, faucet, mobile: leftover uint64 fixups
      
      * ethash: fix tests
      
      * graphql: update schema for timestamp
      
      * ethash: remove unused variable
      0b4fe8d1
  28. 27 3月, 2019 1 次提交
  29. 06 12月, 2018 1 次提交
  30. 21 9月, 2018 1 次提交
  31. 29 8月, 2018 3 次提交
  32. 28 8月, 2018 1 次提交
  33. 23 8月, 2018 2 次提交
  34. 22 8月, 2018 2 次提交
  35. 21 8月, 2018 1 次提交
  36. 17 8月, 2018 1 次提交