Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eth Relay: Duplicate header relay shoud fail, but didn't #214

Closed
hackfisher opened this issue Dec 31, 2019 · 4 comments
Closed

Eth Relay: Duplicate header relay shoud fail, but didn't #214

hackfisher opened this issue Dec 31, 2019 · 4 comments
Assignees

Comments

@hackfisher
Copy link
Contributor

https://icefrog.subscan.io/extrinsic/7242-1
https://icefrog.subscan.io/extrinsic/7335-1

@hackfisher
Copy link
Contributor Author

{"message":"start build resetGenesisHeader extrinsic","level":"info"}
2020-03-02 15:17:12             DRR: TypeError: Cannot read property 'account' of undefined
    at SwitchMapSubscriber.project (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/@polkadot/api-derive/balances/account.js:78:150)
    at SwitchMapSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/switchMap.js:49:27)
    at SwitchMapSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at ReplaySubject.Subject.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subject.js:60:25)
    at ReplaySubject.nextInfiniteTimeWindow (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/ReplaySubject.js:48:31)
    at ConnectableSubscriber.Subscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:89:26)
    at ConnectableSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at DistinctUntilChangedSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/distinctUntilChanged.js:69:30)
    at DistinctUntilChangedSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at CatchSubscriber.Subscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:89:26)
    at CatchSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at MapSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/map.js:55:26)
    at MapSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at SwitchMapSubscriber.notifyNext (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/switchMap.js:89:26)
    at InnerSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
{"message":"createTx ErrorTypeError: Cannot read property 'account' of undefined","level":"error"}

@AurevoirXavier
Copy link
Member

{"message":"start build resetGenesisHeader extrinsic","level":"info"}
2020-03-02 15:17:12             DRR: TypeError: Cannot read property 'account' of undefined
    at SwitchMapSubscriber.project (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/@polkadot/api-derive/balances/account.js:78:150)
    at SwitchMapSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/switchMap.js:49:27)
    at SwitchMapSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at ReplaySubject.Subject.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subject.js:60:25)
    at ReplaySubject.nextInfiniteTimeWindow (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/ReplaySubject.js:48:31)
    at ConnectableSubscriber.Subscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:89:26)
    at ConnectableSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at DistinctUntilChangedSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/distinctUntilChanged.js:69:30)
    at DistinctUntilChangedSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at CatchSubscriber.Subscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:89:26)
    at CatchSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at MapSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/map.js:55:26)
    at MapSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
    at SwitchMapSubscriber.notifyNext (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/operators/switchMap.js:89:26)
    at InnerSubscriber._next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/Users/denny/github.com/darwinia-network/darwinia-proof-tools/node_modules/rxjs/internal/Subscriber.js:66:18)
{"message":"createTx ErrorTypeError: Cannot read property 'account' of undefined","level":"error"}

Due to

Balances to Ring, 93d948e

@hackfisher
Copy link
Contributor Author

This already been fix. Another issue reported from @WoeOm , saying that after relayer worker get killed, re-calling relay_header will fail for the latest block, but not reproduced for now.

@hackfisher
Copy link
Contributor Author

Fixed in following checking:

ensure!(! HeaderInfoOf::get(&header_hash).is_some(), "The header is already known.");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants