-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Key additions and modifications: - Add the L1HeadKey key to the database. It holds the latest core.L1Head - Add blockchain.SetL1Head - The l1 package contains most of the new logic. - We mock the l1.Subscriber interface in tests. In practice, the interface is implemented by the l1.EthSubscriber, which is uses go-ethereum's ethclient and the generated internal/contract/starknet.go. - codecov should ignore the generated l1/contract/starknet.go file. Workflow: node.Run -> l1.Client.Run -> (update is received from subscription) -> blockchain.SetL1Head Co-authored-by: Wojciech Zieba <wojciech.zieba@nethermind.io>
- Loading branch information
1 parent
5670d77
commit c91c58c
Showing
21 changed files
with
1,174 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ coverage: | |
target: 62% | ||
threshold: 2% | ||
only_pulls: true | ||
ignore: | ||
- mocks | ||
- l1/internal/contract/starknet.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package core | ||
|
||
import "github.com/NethermindEth/juno/core/felt" | ||
|
||
type L1Head struct { | ||
BlockNumber uint64 | ||
BlockHash *felt.Felt | ||
StateRoot *felt.Felt | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.