You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

606 lines
18 KiB

7 years ago
7 years ago
7 years ago
7 years ago
lint: Enable Golint (#4212) * Fix many golint errors * Fix golint errors in the 'lite' package * Don't export Pool.store * Fix typo * Revert unwanted changes * Fix errors in counter package * Fix linter errors in kvstore package * Fix linter error in example package * Fix error in tests package * Fix linter errors in v2 package * Fix linter errors in consensus package * Fix linter errors in evidence package * Fix linter error in fail package * Fix linter errors in query package * Fix linter errors in core package * Fix linter errors in node package * Fix linter errors in mempool package * Fix linter error in conn package * Fix linter errors in pex package * Rename PEXReactor export to Reactor * Fix linter errors in trust package * Fix linter errors in upnp package * Fix linter errors in p2p package * Fix linter errors in proxy package * Fix linter errors in mock_test package * Fix linter error in client_test package * Fix linter errors in coretypes package * Fix linter errors in coregrpc package * Fix linter errors in rpcserver package * Fix linter errors in rpctypes package * Fix linter errors in rpctest package * Fix linter error in json2wal script * Fix linter error in wal2json script * Fix linter errors in kv package * Fix linter error in state package * Fix linter error in grpc_client * Fix linter errors in types package * Fix linter error in version package * Fix remaining errors * Address review comments * Fix broken tests * Reconcile package coregrpc * Fix golangci bot error * Fix new golint errors * Fix broken reference * Enable golint linter * minor changes to bring golint into line * fix failing test * fix pex reactor naming * address PR comments
5 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. package evidence
  2. import (
  3. "bytes"
  4. "errors"
  5. "fmt"
  6. "reflect"
  7. "sync"
  8. "sync/atomic"
  9. "time"
  10. "github.com/gogo/protobuf/proto"
  11. gogotypes "github.com/gogo/protobuf/types"
  12. dbm "github.com/tendermint/tm-db"
  13. abci "github.com/tendermint/tendermint/abci/types"
  14. clist "github.com/tendermint/tendermint/libs/clist"
  15. "github.com/tendermint/tendermint/libs/log"
  16. evproto "github.com/tendermint/tendermint/proto/tendermint/evidence"
  17. tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
  18. sm "github.com/tendermint/tendermint/state"
  19. "github.com/tendermint/tendermint/types"
  20. )
  21. const (
  22. baseKeyCommitted = byte(0x00)
  23. baseKeyPending = byte(0x01)
  24. )
  25. // Pool maintains a pool of valid evidence to be broadcasted and committed
  26. type Pool struct {
  27. logger log.Logger
  28. evidenceStore dbm.DB
  29. evidenceList *clist.CList // concurrent linked-list of evidence
  30. evidenceSize uint32 // amount of pending evidence
  31. // needed to load validators to verify evidence
  32. stateDB sm.Store
  33. // needed to load headers and commits to verify evidence
  34. blockStore BlockStore
  35. mtx sync.Mutex
  36. // latest state
  37. state sm.State
  38. pruningHeight int64
  39. pruningTime time.Time
  40. }
  41. // NewPool creates an evidence pool. If using an existing evidence store,
  42. // it will add all pending evidence to the concurrent list.
  43. func NewPool(evidenceDB dbm.DB, stateDB sm.Store, blockStore BlockStore) (*Pool, error) {
  44. state, err := stateDB.Load()
  45. if err != nil {
  46. return nil, fmt.Errorf("cannot load state: %w", err)
  47. }
  48. pool := &Pool{
  49. stateDB: stateDB,
  50. blockStore: blockStore,
  51. state: state,
  52. logger: log.NewNopLogger(),
  53. evidenceStore: evidenceDB,
  54. evidenceList: clist.New(),
  55. }
  56. // if pending evidence already in db, in event of prior failure, then check for expiration,
  57. // update the size and load it back to the evidenceList
  58. pool.pruningHeight, pool.pruningTime = pool.removeExpiredPendingEvidence()
  59. evList, _, err := pool.listEvidence(baseKeyPending, -1)
  60. if err != nil {
  61. return nil, err
  62. }
  63. atomic.StoreUint32(&pool.evidenceSize, uint32(len(evList)))
  64. for _, ev := range evList {
  65. pool.evidenceList.PushBack(ev)
  66. }
  67. return pool, nil
  68. }
  69. // PendingEvidence is used primarily as part of block proposal and returns up to maxNum of uncommitted evidence.
  70. func (evpool *Pool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) {
  71. if atomic.LoadUint32(&evpool.evidenceSize) == 0 {
  72. return []types.Evidence{}, 0
  73. }
  74. evidence, size, err := evpool.listEvidence(baseKeyPending, maxBytes)
  75. if err != nil {
  76. evpool.logger.Error("Unable to retrieve pending evidence", "err", err)
  77. }
  78. return evidence, size
  79. }
  80. // Update pulls the latest state to be used for expiration and evidence params and then prunes all expired evidence
  81. func (evpool *Pool) Update(state sm.State) {
  82. // sanity check
  83. if state.LastBlockHeight <= evpool.state.LastBlockHeight {
  84. panic(fmt.Sprintf(
  85. "Failed EvidencePool.Update new state height is less than or equal to previous state height: %d <= %d",
  86. state.LastBlockHeight,
  87. evpool.state.LastBlockHeight,
  88. ))
  89. }
  90. evpool.logger.Info("Updating evidence pool", "last_block_height", state.LastBlockHeight,
  91. "last_block_time", state.LastBlockTime)
  92. // update the state
  93. evpool.updateState(state)
  94. // prune pending evidence when it has expired. This also updates when the next evidence will expire
  95. if atomic.LoadUint32(&evpool.evidenceSize) > 0 && state.LastBlockHeight > evpool.pruningHeight &&
  96. state.LastBlockTime.After(evpool.pruningTime) {
  97. evpool.pruningHeight, evpool.pruningTime = evpool.removeExpiredPendingEvidence()
  98. }
  99. }
  100. // AddEvidence checks the evidence is valid and adds it to the pool.
  101. func (evpool *Pool) AddEvidence(ev types.Evidence) error {
  102. evpool.logger.Debug("Attempting to add evidence", "ev", ev)
  103. // We have already verified this piece of evidence - no need to do it again
  104. if evpool.isPending(ev) {
  105. evpool.logger.Info("Evidence already pending, ignoring this one", "ev", ev)
  106. return nil
  107. }
  108. // 1) Verify against state.
  109. evInfo, err := evpool.verify(ev)
  110. if err != nil {
  111. return types.NewErrInvalidEvidence(ev, err)
  112. }
  113. // 2) Save to store.
  114. if err := evpool.addPendingEvidence(evInfo); err != nil {
  115. return fmt.Errorf("can't add evidence to pending list: %w", err)
  116. }
  117. // 3) Add evidence to clist.
  118. evpool.evidenceList.PushBack(ev)
  119. evpool.logger.Info("Verified new evidence of byzantine behavior", "evidence", ev)
  120. return nil
  121. }
  122. // AddEvidenceFromConsensus should be exposed only to the consensus so it can add evidence to the pool
  123. // directly without the need for verification.
  124. func (evpool *Pool) AddEvidenceFromConsensus(ev types.Evidence, time time.Time, valSet *types.ValidatorSet) error {
  125. var (
  126. vals []*types.Validator
  127. totalPower int64
  128. )
  129. // we already have this evidence, log this but don't return an error.
  130. if evpool.isPending(ev) {
  131. evpool.logger.Info("Evidence already pending, ignoring this one", "ev", ev)
  132. return nil
  133. }
  134. switch ev := ev.(type) {
  135. case *types.DuplicateVoteEvidence:
  136. _, val := valSet.GetByAddress(ev.VoteA.ValidatorAddress)
  137. vals = append(vals, val)
  138. totalPower = valSet.TotalVotingPower()
  139. default:
  140. return fmt.Errorf("unrecognized evidence type: %T", ev)
  141. }
  142. evInfo := &info{
  143. Evidence: ev,
  144. Time: time,
  145. Validators: vals,
  146. TotalVotingPower: totalPower,
  147. }
  148. if err := evpool.addPendingEvidence(evInfo); err != nil {
  149. return fmt.Errorf("can't add evidence to pending list: %w", err)
  150. }
  151. // add evidence to be gossiped with peers
  152. evpool.evidenceList.PushBack(ev)
  153. evpool.logger.Info("Verified new evidence of byzantine behavior", "evidence", ev)
  154. return nil
  155. }
  156. // CheckEvidence takes an array of evidence from a block and verifies all the evidence there.
  157. // If it has already verified the evidence then it jumps to the next one. It ensures that no
  158. // evidence has already been committed or is being proposed twice. It also adds any
  159. // evidence that it doesn't currently have so that it can quickly form ABCI Evidence later.
  160. func (evpool *Pool) CheckEvidence(evList types.EvidenceList) error {
  161. hashes := make([][]byte, len(evList))
  162. for idx, ev := range evList {
  163. ok := evpool.fastCheck(ev)
  164. if !ok {
  165. evInfo, err := evpool.verify(ev)
  166. if err != nil {
  167. return &types.ErrInvalidEvidence{Evidence: ev, Reason: err}
  168. }
  169. if err := evpool.addPendingEvidence(evInfo); err != nil {
  170. evpool.logger.Error("Can't add evidence to pending list", "err", err, "evInfo", evInfo)
  171. }
  172. evpool.logger.Info("Verified new evidence of byzantine behavior", "evidence", ev)
  173. }
  174. // check for duplicate evidence. We cache hashes so we don't have to work them out again.
  175. hashes[idx] = ev.Hash()
  176. for i := idx - 1; i >= 0; i-- {
  177. if bytes.Equal(hashes[i], hashes[idx]) {
  178. return &types.ErrInvalidEvidence{Evidence: ev, Reason: errors.New("duplicate evidence")}
  179. }
  180. }
  181. }
  182. return nil
  183. }
  184. // ABCIEvidence processes all the evidence in the block, marking it as committed and removing it
  185. // from the pending database. It then forms the individual abci evidence that will be passed back to
  186. // the application.
  187. func (evpool *Pool) ABCIEvidence(height int64, evidence []types.Evidence) []abci.Evidence {
  188. // make a map of committed evidence to remove from the clist
  189. blockEvidenceMap := make(map[string]struct{}, len(evidence))
  190. abciEvidence := make([]abci.Evidence, 0)
  191. for _, ev := range evidence {
  192. // get entire evidence info from pending list
  193. infoBytes, err := evpool.evidenceStore.Get(keyPending(ev))
  194. if err != nil {
  195. evpool.logger.Error("Unable to retrieve evidence to pass to ABCI. "+
  196. "Evidence pool should have seen this evidence before",
  197. "evidence", ev, "err", err)
  198. continue
  199. }
  200. var infoProto evproto.Info
  201. err = infoProto.Unmarshal(infoBytes)
  202. if err != nil {
  203. evpool.logger.Error("Decoding evidence info failed", "err", err, "height", ev.Height(), "hash", ev.Hash())
  204. continue
  205. }
  206. evInfo, err := infoFromProto(&infoProto)
  207. if err != nil {
  208. evpool.logger.Error("Converting evidence info from proto failed", "err", err, "height", ev.Height(),
  209. "hash", ev.Hash())
  210. continue
  211. }
  212. var evType abci.EvidenceType
  213. switch ev.(type) {
  214. case *types.DuplicateVoteEvidence:
  215. evType = abci.EvidenceType_DUPLICATE_VOTE
  216. case *types.LightClientAttackEvidence:
  217. evType = abci.EvidenceType_LIGHT_CLIENT_ATTACK
  218. default:
  219. evpool.logger.Error("Unknown evidence type", "T", reflect.TypeOf(ev))
  220. continue
  221. }
  222. for _, val := range evInfo.Validators {
  223. abciEv := abci.Evidence{
  224. Type: evType,
  225. Validator: types.TM2PB.Validator(val),
  226. Height: ev.Height(),
  227. Time: evInfo.Time,
  228. TotalVotingPower: evInfo.TotalVotingPower,
  229. }
  230. abciEvidence = append(abciEvidence, abciEv)
  231. evpool.logger.Info("Created ABCI evidence", "ev", abciEv)
  232. }
  233. // we can now remove the evidence from the pending list and the clist that we use for gossiping
  234. evpool.removePendingEvidence(ev)
  235. blockEvidenceMap[evMapKey(ev)] = struct{}{}
  236. // Add evidence to the committed list
  237. // As the evidence is stored in the block store we only need to record the height that it was saved at.
  238. key := keyCommitted(ev)
  239. h := gogotypes.Int64Value{Value: height}
  240. evBytes, err := proto.Marshal(&h)
  241. if err != nil {
  242. panic(err)
  243. }
  244. if err := evpool.evidenceStore.Set(key, evBytes); err != nil {
  245. evpool.logger.Error("Unable to add committed evidence", "err", err)
  246. }
  247. }
  248. // remove committed evidence from the clist
  249. if len(blockEvidenceMap) != 0 {
  250. evpool.removeEvidenceFromList(blockEvidenceMap)
  251. }
  252. return abciEvidence
  253. }
  254. // EvidenceFront goes to the first evidence in the clist
  255. func (evpool *Pool) EvidenceFront() *clist.CElement {
  256. return evpool.evidenceList.Front()
  257. }
  258. // EvidenceWaitChan is a channel that closes once the first evidence in the list is there. i.e Front is not nil
  259. func (evpool *Pool) EvidenceWaitChan() <-chan struct{} {
  260. return evpool.evidenceList.WaitChan()
  261. }
  262. // SetLogger sets the Logger.
  263. func (evpool *Pool) SetLogger(l log.Logger) {
  264. evpool.logger = l
  265. }
  266. // State returns the current state of the evpool.
  267. func (evpool *Pool) State() sm.State {
  268. evpool.mtx.Lock()
  269. defer evpool.mtx.Unlock()
  270. return evpool.state
  271. }
  272. //--------------------------------------------------------------------------
  273. // Info is a wrapper around the evidence that the evidence pool receives with extensive
  274. // information of what validators were malicious, the time of the attack and the total voting power
  275. // This is saved as a form of cache so that the evidence pool can easily produce the ABCI Evidence
  276. // needed to be sent to the application.
  277. type info struct {
  278. Evidence types.Evidence
  279. Time time.Time
  280. Validators []*types.Validator
  281. TotalVotingPower int64
  282. ByteSize int64
  283. }
  284. // ToProto encodes into protobuf
  285. func (ei info) ToProto() (*evproto.Info, error) {
  286. evpb, err := types.EvidenceToProto(ei.Evidence)
  287. if err != nil {
  288. return nil, err
  289. }
  290. valsProto := make([]*tmproto.Validator, len(ei.Validators))
  291. for i := 0; i < len(ei.Validators); i++ {
  292. valp, err := ei.Validators[i].ToProto()
  293. if err != nil {
  294. return nil, err
  295. }
  296. valsProto[i] = valp
  297. }
  298. return &evproto.Info{
  299. Evidence: *evpb,
  300. Time: ei.Time,
  301. Validators: valsProto,
  302. TotalVotingPower: ei.TotalVotingPower,
  303. }, nil
  304. }
  305. // InfoFromProto decodes from protobuf into Info
  306. func infoFromProto(proto *evproto.Info) (info, error) {
  307. if proto == nil {
  308. return info{}, errors.New("nil evidence info")
  309. }
  310. ev, err := types.EvidenceFromProto(&proto.Evidence)
  311. if err != nil {
  312. return info{}, err
  313. }
  314. vals := make([]*types.Validator, len(proto.Validators))
  315. for i := 0; i < len(proto.Validators); i++ {
  316. val, err := types.ValidatorFromProto(proto.Validators[i])
  317. if err != nil {
  318. return info{}, err
  319. }
  320. vals[i] = val
  321. }
  322. return info{
  323. Evidence: ev,
  324. Time: proto.Time,
  325. Validators: vals,
  326. TotalVotingPower: proto.TotalVotingPower,
  327. ByteSize: int64(proto.Evidence.Size()),
  328. }, nil
  329. }
  330. //--------------------------------------------------------------------------
  331. // fastCheck leverages the fact that the evidence pool may have already verified the evidence to see if it can
  332. // quickly conclude that the evidence is already valid.
  333. func (evpool *Pool) fastCheck(ev types.Evidence) bool {
  334. key := keyPending(ev)
  335. if lcae, ok := ev.(*types.LightClientAttackEvidence); ok {
  336. evBytes, err := evpool.evidenceStore.Get(key)
  337. if evBytes == nil { // the evidence is not in the nodes pending list
  338. return false
  339. }
  340. if err != nil {
  341. evpool.logger.Error("Failed to load evidence", "err", err, "evidence", lcae)
  342. return false
  343. }
  344. evInfo, err := bytesToInfo(evBytes)
  345. if err != nil {
  346. evpool.logger.Error("Failed to convert evidence from proto", "err", err, "evidence", lcae)
  347. return false
  348. }
  349. // ensure that all the validators that the evidence pool have found to be malicious
  350. // are present in the list of commit signatures in the conflicting block
  351. OUTER:
  352. for _, sig := range lcae.ConflictingBlock.Commit.Signatures {
  353. for _, val := range evInfo.Validators {
  354. if bytes.Equal(val.Address, sig.ValidatorAddress) {
  355. continue OUTER
  356. }
  357. }
  358. // a validator we know is malicious is not included in the commit
  359. evpool.logger.Info("Fast check failed: a validator we know is malicious is not " +
  360. "in the commit sigs. Reverting to full verification")
  361. return false
  362. }
  363. return true
  364. }
  365. // for all other evidence the evidence pool just checks if it is already in the pending db
  366. return evpool.isPending(ev)
  367. }
  368. // IsExpired checks whether evidence or a polc is expired by checking whether a height and time is older
  369. // than set by the evidence consensus parameters
  370. func (evpool *Pool) isExpired(height int64, time time.Time) bool {
  371. var (
  372. params = evpool.State().ConsensusParams.Evidence
  373. ageDuration = evpool.State().LastBlockTime.Sub(time)
  374. ageNumBlocks = evpool.State().LastBlockHeight - height
  375. )
  376. return ageNumBlocks > params.MaxAgeNumBlocks &&
  377. ageDuration > params.MaxAgeDuration
  378. }
  379. // IsCommitted returns true if we have already seen this exact evidence and it is already marked as committed.
  380. func (evpool *Pool) isCommitted(evidence types.Evidence) bool {
  381. key := keyCommitted(evidence)
  382. ok, err := evpool.evidenceStore.Has(key)
  383. if err != nil {
  384. evpool.logger.Error("Unable to find committed evidence", "err", err)
  385. }
  386. return ok
  387. }
  388. // IsPending checks whether the evidence is already pending. DB errors are passed to the logger.
  389. func (evpool *Pool) isPending(evidence types.Evidence) bool {
  390. key := keyPending(evidence)
  391. ok, err := evpool.evidenceStore.Has(key)
  392. if err != nil {
  393. evpool.logger.Error("Unable to find pending evidence", "err", err)
  394. }
  395. return ok
  396. }
  397. func (evpool *Pool) addPendingEvidence(evInfo *info) error {
  398. evpb, err := evInfo.ToProto()
  399. if err != nil {
  400. return fmt.Errorf("unable to convert to proto, err: %w", err)
  401. }
  402. evBytes, err := evpb.Marshal()
  403. if err != nil {
  404. return fmt.Errorf("unable to marshal evidence: %w", err)
  405. }
  406. key := keyPending(evInfo.Evidence)
  407. err = evpool.evidenceStore.Set(key, evBytes)
  408. if err != nil {
  409. return fmt.Errorf("can't persist evidence: %w", err)
  410. }
  411. atomic.AddUint32(&evpool.evidenceSize, 1)
  412. return nil
  413. }
  414. func (evpool *Pool) removePendingEvidence(evidence types.Evidence) {
  415. key := keyPending(evidence)
  416. if err := evpool.evidenceStore.Delete(key); err != nil {
  417. evpool.logger.Error("Unable to delete pending evidence", "err", err)
  418. } else {
  419. atomic.AddUint32(&evpool.evidenceSize, ^uint32(0))
  420. evpool.logger.Info("Deleted pending evidence", "evidence", evidence)
  421. }
  422. }
  423. // listEvidence retrieves lists evidence from oldest to newest within maxBytes.
  424. // If maxBytes is -1, there's no cap on the size of returned evidence.
  425. func (evpool *Pool) listEvidence(prefixKey byte, maxBytes int64) ([]types.Evidence, int64, error) {
  426. var totalSize int64
  427. var evidence []types.Evidence
  428. iter, err := dbm.IteratePrefix(evpool.evidenceStore, []byte{prefixKey})
  429. if err != nil {
  430. return nil, totalSize, fmt.Errorf("database error: %v", err)
  431. }
  432. defer iter.Close()
  433. for ; iter.Valid(); iter.Next() {
  434. evInfo, err := bytesToInfo(iter.Value())
  435. if err != nil {
  436. return nil, totalSize, err
  437. }
  438. totalSize += evInfo.ByteSize
  439. if maxBytes != -1 && totalSize > maxBytes {
  440. return evidence, totalSize - evInfo.ByteSize, nil
  441. }
  442. evidence = append(evidence, evInfo.Evidence)
  443. }
  444. return evidence, totalSize, nil
  445. }
  446. func (evpool *Pool) removeExpiredPendingEvidence() (int64, time.Time) {
  447. iter, err := dbm.IteratePrefix(evpool.evidenceStore, []byte{baseKeyPending})
  448. if err != nil {
  449. evpool.logger.Error("Unable to iterate over pending evidence", "err", err)
  450. return evpool.State().LastBlockHeight, evpool.State().LastBlockTime
  451. }
  452. defer iter.Close()
  453. blockEvidenceMap := make(map[string]struct{})
  454. for ; iter.Valid(); iter.Next() {
  455. evInfo, err := bytesToInfo(iter.Value())
  456. if err != nil {
  457. evpool.logger.Error("Error in transition evidence from protobuf", "err", err)
  458. continue
  459. }
  460. if !evpool.isExpired(evInfo.Evidence.Height(), evInfo.Time) {
  461. if len(blockEvidenceMap) != 0 {
  462. evpool.removeEvidenceFromList(blockEvidenceMap)
  463. }
  464. // return the height and time with which this evidence will have expired so we know when to prune next
  465. return evInfo.Evidence.Height() + evpool.State().ConsensusParams.Evidence.MaxAgeNumBlocks + 1,
  466. evInfo.Time.Add(evpool.State().ConsensusParams.Evidence.MaxAgeDuration).Add(time.Second)
  467. }
  468. evpool.removePendingEvidence(evInfo.Evidence)
  469. blockEvidenceMap[evMapKey(evInfo.Evidence)] = struct{}{}
  470. }
  471. // We either have no pending evidence or all evidence has expired
  472. if len(blockEvidenceMap) != 0 {
  473. evpool.removeEvidenceFromList(blockEvidenceMap)
  474. }
  475. return evpool.State().LastBlockHeight, evpool.State().LastBlockTime
  476. }
  477. func (evpool *Pool) removeEvidenceFromList(
  478. blockEvidenceMap map[string]struct{}) {
  479. for e := evpool.evidenceList.Front(); e != nil; e = e.Next() {
  480. // Remove from clist
  481. ev := e.Value.(types.Evidence)
  482. if _, ok := blockEvidenceMap[evMapKey(ev)]; ok {
  483. evpool.evidenceList.Remove(e)
  484. e.DetachPrev()
  485. }
  486. }
  487. }
  488. func (evpool *Pool) updateState(state sm.State) {
  489. evpool.mtx.Lock()
  490. defer evpool.mtx.Unlock()
  491. evpool.state = state
  492. }
  493. func bytesToInfo(evBytes []byte) (info, error) {
  494. var evpb evproto.Info
  495. err := evpb.Unmarshal(evBytes)
  496. if err != nil {
  497. return info{}, err
  498. }
  499. return infoFromProto(&evpb)
  500. }
  501. func evMapKey(ev types.Evidence) string {
  502. return string(ev.Hash())
  503. }
  504. // big endian padded hex
  505. func bE(h int64) string {
  506. return fmt.Sprintf("%0.16X", h)
  507. }
  508. func keyCommitted(evidence types.Evidence) []byte {
  509. return append([]byte{baseKeyCommitted}, keySuffix(evidence)...)
  510. }
  511. func keyPending(evidence types.Evidence) []byte {
  512. return append([]byte{baseKeyPending}, keySuffix(evidence)...)
  513. }
  514. func keySuffix(evidence types.Evidence) []byte {
  515. return []byte(fmt.Sprintf("%s/%X", bE(evidence.Height()), evidence.Hash()))
  516. }