Skip to content
Snippets Groups Projects
  1. May 11, 2023
  2. Apr 04, 2023
  3. Mar 24, 2023
  4. Jan 19, 2023
  5. Jan 02, 2023
  6. Dec 15, 2022
  7. Dec 12, 2022
  8. Dec 02, 2022
  9. Dec 01, 2022
  10. Nov 29, 2022
  11. Nov 28, 2022
  12. Nov 23, 2022
  13. Nov 21, 2022
  14. Nov 17, 2022
  15. Nov 08, 2022
    • Piotr Batko's avatar
      Add support for replaying from renamed block log · 65743973
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      Previously when node was preparing replay and copying block log file, it does
      not care about block log name. If block log was named bad_block_log, then it
      was copied with that name to SomeNode/blockchain directory. But it caused
      problem, because node requires to have block log with name "block_log".
      
      Now this name is enforced. During copying, destination file name is always set
      to valid "block_log" name.
      
      It allows to replay from renamed block log with syntax:
      ```
      node.run(replay_from="/path/to/block_logs/block_log_5m")  # Note custom block log name
      ```
      65743973
    • Piotr Batko's avatar
      Replace node.get_block_log() with property node.block_log · 95579b23
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      95579b23
    • Piotr Batko's avatar
      Remove helper function which is now unneeded · 2ba1a05f
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      2ba1a05f
    • Piotr Batko's avatar
      Remove unused member `owner` from BlockLog · 3edb4a4a
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      3edb4a4a
    • Piotr Batko's avatar
      Test copying to custom directory · 1b49c06d
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      It covers real use case, where users pregenerate block log for tests and then
      copies it to selected directory.
      1b49c06d
    • Piotr Batko's avatar
      Report error if `artifacts` parameter have unsupported value · 10d55361
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      10d55361
    • Piotr Batko's avatar
      Way of copying artifacts is selected during copying, not during block log object creation · cd2449fb
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      At the first version of block log implementation in TestTools, when block log object was
      created, user had to decide how artifacts will be treated during copying.
      
      Few commits ago there was added possibility, to override way of copying artifacts just in
      time of copying (with `block_log.copy_to(destination, artifacts="always")`).
      
      It turned out, that there is no need to specify it during block log creation in any use
      case. Block log objects are used in following use cases:
      1) to replay a node from given block log -- in this case node have to include artifacts if
         are provided (it's policy named "optional"),
      2) to perform copy of block log generated by node under -- then users wants only block
         logs, without artifacts, and might be even suprised if artifacts would be copied
         together (it's policy named "exclude").
      
      So in this commit:
      - way of specifing how artifacts should be copied is disabled in BlockLog's initializer
      - by default artifacts are not copied (by default are "excluded") to simplify use case #2
      - in Node.run method, when block log is used for replaying node, artifacts are copied
        if provided, and it's ok, if are missing (it's policy named "optional") -- use case #1
      cd2449fb
    • Piotr Batko's avatar
      Prevent copying block log files partially when error occurs · 022d9ca3
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      There was a bug, that first block_log file was copied, and then existing of
      artifacts file was checked. If artifacts were missing, then error was raised,
      but part of block log was already copied.
      
      Now copying procedure ensures, that files to copy exists and copying will
      pass without problems.
      022d9ca3
    • Piotr Batko's avatar
      Rewrite block log artifacts behavior during copying · d6484320
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      Before:
      - artifacts were either:
        - required (were copied with block log, when were missing warning were emitted), or
        - excluded (were always not copied, even if existed).
      
      Now:
      - artifacts can be:
        - required (as above, but when are missing raises exception instead of warning),
        - optional (copied when exist; missing artifacts is acceptable, is not treated as error),
        - excluded (same as above).
      d6484320
    • Piotr Batko's avatar
      Replace block log path getter with property · 6374a508
      Piotr Batko authored and Bartek Wrona's avatar Bartek Wrona committed
      6374a508
  16. Nov 03, 2022
Loading