Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
errors.go
events.go
export_test.go
monitor.go
monitor_test.go
produce.go
produce_test.go
producer.go
producer_test.go
queries.go
queries_test.go
range_of_interest.go
range_of_interest_test.go

README.md

Monitor

Monitor performs Log collecting periodically.

Several most recent blocks on the blockchain are considered unreliable (the relevant setting is eth.min.confirmations).

Let:

  • A = last processed block number
  • Z = most recent block number on the blockchain
  • C = the min confirmations setting
  • F = the fresh blocks setting
  • L = the limit blocks to retrieve setting

Thus the range of interest it is:

    if F > 0 Ro = Ri ∩ [Z - C - F, +inf)
    else Ro = Ri

and:

    if L > 0 & (Z - C) > (A + 1) & (Z - C) - (A + 1) > L Ri = A + 1 + L
    else Ri = Z - C

These are the rules for filtering logs on the blockchain:

For Agents:

  1. all events with agent account address as topic[1]
  • Topics[0]: any
  • Topics[1]: one of accounts with in_use = true
  1. all incoming transfers
  • Topics[0]: Transfer
  • Topics[2]: one of accounts with in_use = true

For Clients: 1.

  • Topics[0]: one of these hashes
    • Transfer
    • LogChannelToppedUp
    • LogChannelCloseRequested
  • Topics[2]: one of the accounts with in_use = true
  • Topics[0]: one of these hashes
    • Tranfer
    • Approval
  • Topics[1]: one of the accounts with in_use = true
  • Topics[0]: one of these hashes
    • LogChannelCreated
    • LogOfferingCreated
    • LogOfferingDeleted
    • LogOfferingPopedUp
    • LogCooperativeChannelClose
    • LogUnCooperativeChannelClose
You can’t perform that action at this time.