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

Feature/v0.4.0 merge fraud proof #814

Merged
merged 171 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
c47b4f1
[feat]: imply proof state
Sha3nS Dec 15, 2022
ef5daf5
[feat]: imply proof
Sha3nS Dec 16, 2022
6937335
[feat]: imply prover
Sha3nS Dec 16, 2022
b093eee
[fix]: imply prover in proof
Sha3nS Dec 19, 2022
872bdfd
[feat]: import fraud proof rollup module
Sha3nS Dec 20, 2022
a8d4775
[feat]: imply rollup service
Sha3nS Dec 22, 2022
d291dc2
[feat]: imply interface, twist sequencer to batch submiter
Sha3nS Dec 22, 2022
8d24b4a
[fix]: fix detils
Sha3nS Dec 23, 2022
bd42119
[feat]: modify assertion and recompile abi bindings
Sha3nS Jan 3, 2023
201e52d
[feat]: imply fraud proof module service entrance
Sha3nS Jan 4, 2023
d54443d
[fix]: fix compile
Sha3nS Jan 5, 2023
8c6fe7a
[fix]: modify batch submmiter with fraud proof entrance
Sha3nS Jan 5, 2023
ae2d5e7
[fix]: fix rollup details
Sha3nS Jan 6, 2023
8c38a08
[fix]: fix assertion create update gas bug
Sha3nS Jan 19, 2023
b179d74
WIP: Fraud proof contract test (#626)
Kukoomomo Feb 9, 2023
cc19230
[fix] update fraud proof contracts to osp branch
Sha3nS Feb 10, 2023
2d62bb2
[fix]: add node type, stake with initialize
Sha3nS Feb 13, 2023
de4fa7a
[fix]: fix fraud proof deploy script on osp
Sha3nS Feb 14, 2023
6a57db9
[fix]: fix rollup assertion with osp
Sha3nS Feb 14, 2023
e1450a5
WIP : Update challenge contract (#644)
Kukoomomo Feb 14, 2023
178deb8
WIP: Feature/fraud proof assertion (#468)
Sha3nS Feb 14, 2023
60b93ca
[feat]: l2geth stake with init
Sha3nS Feb 15, 2023
0f471dc
WIP: Feature/fraud proof stake (#647)
Sha3nS Feb 16, 2023
99b5c46
[feat]: l2geth stake with init
Sha3nS Feb 15, 2023
27f9787
[fix]: debug schedular run loops
Sha3nS Feb 16, 2023
3bbb04a
[fix]: fix assertion deadline
Sha3nS Feb 16, 2023
17d2699
[fix]: fix rollup assertion method
Sha3nS Feb 17, 2023
2422c1e
[fix]: fix txbatch to assertion gas cumulated bug
Sha3nS Feb 17, 2023
e7c3af8
Fix roullup function and check stake when sequencer start (#660)
Kukoomomo Feb 17, 2023
3c56e68
fix address nil point (#661)
Kukoomomo Feb 17, 2023
c3ef9a2
Merge branch 'feature/fraud-proof' into feature/fraud-proof-challenge
Kukoomomo Feb 17, 2023
b83a9c7
Feature/fraud proof challenge (#652)
Sha3nS Feb 17, 2023
98dd1c1
FP : Add challenge contract test (#645)
Kukoomomo Feb 20, 2023
97bf728
[feat]: verify osp new commit
Sha3nS Feb 20, 2023
ff0a12c
[fix]: twist flags
Sha3nS Feb 20, 2023
f5332ae
[fix]: edit stake address reference
Sha3nS Feb 20, 2023
91b2373
[fix]: fix env
Sha3nS Feb 20, 2023
0591938
[fix]: debug verifier
Sha3nS Feb 21, 2023
d62e769
[fix]: imply validationLoop
Sha3nS Feb 22, 2023
93eacc8
remove contracts gasused
Kukoomomo Feb 22, 2023
956551c
remove gasUsed
Kukoomomo Feb 22, 2023
b9083f0
update
Kukoomomo Feb 22, 2023
75ec0ff
Remove gasUsed (#692)
Sha3nS Feb 22, 2023
c656e48
[fix]: fix conflict
Sha3nS Feb 22, 2023
db9ce04
[fix]: remove validator gasused
Sha3nS Feb 22, 2023
654369c
Eliminate misjudgment
Kukoomomo Feb 23, 2023
cccd24e
Merge remote-tracking branch 'origin/feature/fraud-proof-verfy-osp' i…
Kukoomomo Feb 23, 2023
ce7dbe0
[fix]: fix nil parent assertion refernence
Sha3nS Feb 23, 2023
b1f0a0f
Eliminate misjudgment (#698)
Sha3nS Feb 23, 2023
c0506a6
[fix]: fix vaidatorLoop check vmHash root
Sha3nS Feb 23, 2023
0e99c4d
[fix]: edit logs
Sha3nS Feb 23, 2023
5f894e1
Feature/fraud proof verify osp edit validator (#697)
Sha3nS Feb 23, 2023
39dde11
[fix]: exit challenge prover
Sha3nS Feb 26, 2023
39998ba
advance the assertion that has fallen behind
Kukoomomo Feb 27, 2023
e736af0
advance the assertion that has fallen behind
Kukoomomo Feb 27, 2023
5fc3fda
break if challenge
Kukoomomo Feb 27, 2023
e2b072c
[fix]: refact prover bisection execute
Sha3nS Feb 28, 2023
d2d8fe5
[fix]: edit challengedSegmentIndex check
Sha3nS Feb 28, 2023
6dab9ee
[fix]: add range check
Sha3nS Feb 28, 2023
cb71233
[fix]: refact prover bisection execute (#709)
Sha3nS Feb 28, 2023
cb45e0c
Merge remote-tracking branch 'origin/feature/fraud-proof-verfy-osp' i…
Kukoomomo Feb 28, 2023
8a06173
Add mock SCC contract for roll up test (#700)
Kukoomomo Feb 28, 2023
353079f
ConfirmFirstUnresolvedAssertion when l1 in confirm height
Kukoomomo Mar 1, 2023
b639858
[feat]: run through challenge and verify
Sha3nS Mar 1, 2023
222107b
Feature/fraud proof verfy osp challenge and verify (#712)
Sha3nS Mar 2, 2023
7fe2783
store is in challenge
Kukoomomo Mar 2, 2023
3f20068
Merge branch 'kukoo/Advance' into kukoo/restart
Kukoomomo Mar 2, 2023
fb6865c
restart scheduler
Kukoomomo Mar 2, 2023
c758342
WIP : Advance the assertion that has fallen behind (#706)
Kukoomomo Mar 2, 2023
c91328c
Merge remote-tracking branch 'origin/feature/fraud-proof-verfy-osp' i…
Kukoomomo Mar 2, 2023
2788a28
update
Kukoomomo Mar 2, 2023
288271a
sequencer restart
Kukoomomo Mar 3, 2023
e96cf4b
sequencer restart
Kukoomomo Mar 3, 2023
d2430bf
validator restart
Kukoomomo Mar 6, 2023
6bd8c0f
Fraud Proof : restart (#715)
Sha3nS Mar 6, 2023
bcfbf95
update validator restart
Kukoomomo Mar 6, 2023
b0cf975
update validator restart
Kukoomomo Mar 6, 2023
451ac5c
clean the unused code
Kukoomomo Mar 6, 2023
f0fd267
fix validator restrt can not find ctx
Kukoomomo Mar 7, 2023
1561a0d
update batch submitter
Kukoomomo Mar 7, 2023
3a2609f
update batch submitter
Kukoomomo Mar 7, 2023
1ace9b9
import fotmat
Kukoomomo Mar 7, 2023
a8e62ea
[feat]: add stake whitelist
Sha3nS Mar 7, 2023
61ad1e1
[fix]: remove redundent conosole log
Sha3nS Mar 7, 2023
19db716
[Fraud Proof]: add stake whitelist (#722)
Sha3nS Mar 8, 2023
2c227e2
Merge branch 'feature/fraud-proof-verfy-osp' into kukoo/restart
Kukoomomo Mar 8, 2023
f7b9c3b
[Fraud Proof]: validator restart (#720)
Sha3nS Mar 8, 2023
77b5dc6
Add batch submitter status check
Kukoomomo Mar 8, 2023
37640f3
Add batch submitter status check (#728)
Sha3nS Mar 8, 2023
ec8acd4
[feat]: rollback scc when validator challenge success
Sha3nS Mar 8, 2023
b3f1d77
[fix]: fix rollback scc
Sha3nS Mar 9, 2023
50bab05
Feature/fraud proof verfy osp rollback scc tss (#731)
byteflyfunny Mar 9, 2023
5b5d59a
[fix]: fix SetRollback time line
Sha3nS Mar 9, 2023
a8696fa
[fix]: fix sequencer driver global sync.Once
Sha3nS Mar 9, 2023
d0d45c2
Merge branch 'feature/fraud-proof-verfy-osp' into feature/fraud-proof…
Sha3nS Mar 9, 2023
3c84d86
Feature/fraud proof verfy osp rollback scc (#729)
Sha3nS Mar 9, 2023
9e72cd0
[fix]: fix conflict
Sha3nS Mar 9, 2023
e7f805f
[feat]: imply verify one step proof with contract and offchain impliment
Sha3nS Mar 10, 2023
8658770
update batch submitter check
Kukoomomo Mar 13, 2023
d073555
[fix]: imply test prover; fix rollup ownership bug
Sha3nS Mar 13, 2023
a417c15
[fix]: regist eth apis & fix details
Sha3nS Mar 13, 2023
fce2a91
[fix]: fix rolluper address
Sha3nS Mar 14, 2023
92c591c
fix bug: batch submitter start without roull up init
Kukoomomo Mar 14, 2023
6ed9f66
fix deploy with proxy owner equal impl owner
Kukoomomo Mar 14, 2023
7c5cb14
Merge branch 'feature/fraud-proof-verfy-osp-implyosp' of github.com:m…
Kukoomomo Mar 14, 2023
fa09b45
fix api call
Kukoomomo Mar 14, 2023
8586b29
[fix]: twist tracer
Sha3nS Mar 14, 2023
17e884e
change api namespace to debug
Kukoomomo Mar 14, 2023
d9a4752
remove startNum
Kukoomomo Mar 15, 2023
5d2dca4
[fix]: fix bisection and execute
Sha3nS Mar 16, 2023
eb7fb55
[fix]: debug proof codec
Sha3nS Mar 17, 2023
3b45f15
[fix]: update dump json
Sha3nS Mar 17, 2023
3252b5a
add verifier deploy task
Kukoomomo Mar 17, 2023
c82e858
Merge branch 'feature/fraud-proof-verfy-osp-implyosp' into feature/fr…
Sha3nS Mar 17, 2023
fa593fe
[fix]: debug proof codec (#749)
Sha3nS Mar 17, 2023
d350107
[feat]: imply verify one step proof with contract and offchain implim…
Sha3nS Mar 17, 2023
b152fde
deploy verifier by script
Kukoomomo Mar 17, 2023
2b3c05a
Deploy verifier by script (#751)
Sha3nS Mar 17, 2023
fb02bde
[fix]: fix details
Sha3nS Mar 20, 2023
fd2fe6b
[fix]: fix details (#756)
Sha3nS Mar 20, 2023
3fb97e0
challenge need sequencer complete
Kukoomomo Mar 21, 2023
dbf0f30
challenge need sequencer complete (#761)
Sha3nS Mar 22, 2023
467de22
[feat]: allow fraud in l2geth
Sha3nS Mar 21, 2023
bec9698
set 0 for L1toL2 tx sig
Kukoomomo Mar 22, 2023
891e581
Merge remote-tracking branch 'origin/feature/fraud-proof-verfy-osp' i…
Kukoomomo Mar 22, 2023
ada9e5a
Fix OSP nil point (#763)
Sha3nS Mar 22, 2023
2ed89c2
[fix]: remove fraud in interpreter
Sha3nS Mar 22, 2023
0abfc6c
Feature/fraud proof verfy osp remove fraud in interpreter (#765)
Sha3nS Mar 22, 2023
3e693c2
[fix]: fix details
Sha3nS Mar 22, 2023
2f562bb
[fix]: fix details (#768)
Sha3nS Mar 23, 2023
84681a1
fix challenge complete
Kukoomomo Mar 27, 2023
ef41759
add status log
Kukoomomo Mar 27, 2023
c47216e
Fix challenge complete (#776)
Sha3nS Mar 27, 2023
6a05d78
Re-challenge for one verifier
Kukoomomo Mar 29, 2023
5a6f507
clean
Kukoomomo Mar 29, 2023
0b96fc9
format
Kukoomomo Mar 30, 2023
2d5b8ef
update
Kukoomomo Mar 30, 2023
41222cd
Fraud proof verfy osp rechallenge (#783)
Sha3nS Mar 30, 2023
f3121d0
Add verifier re-stake check and challenge verifiery
Kukoomomo Mar 30, 2023
7467a6c
code clean
Kukoomomo Mar 30, 2023
43a3f33
Add verifier re-stake check and challenge verifiery (#784)
Sha3nS Mar 30, 2023
e9a6546
[fix]: fix merge conflict
Sha3nS Mar 31, 2023
a7624bc
[fix]: fix merge conflict
Sha3nS Mar 31, 2023
6f53c43
[fix]: remove test method
Sha3nS Mar 31, 2023
7d9f977
Feature/fraud proof verfy osp fix conflict (#785)
Sha3nS Mar 31, 2023
f52050f
remove verifier deploy test code
Kukoomomo Mar 31, 2023
d1bfc7f
code format
Kukoomomo Mar 31, 2023
a3f4f98
change log level
Kukoomomo Mar 31, 2023
f05cba7
Fraud proof verfy osp code clean (#786)
Sha3nS Mar 31, 2023
5a3c817
[fix]: edit log infos
Sha3nS Mar 31, 2023
3e4c0ee
[fix]: edit log infos (#788)
Sha3nS Mar 31, 2023
a6f19c7
import format
Kukoomomo Mar 31, 2023
623dbc2
Feature/fraud proof verify osp (#664)
Sha3nS Apr 3, 2023
ab8b2c8
fix test
Kukoomomo Apr 4, 2023
862c473
Fix test (#796)
Sha3nS Apr 4, 2023
fd94963
change default challenge verify config
Kukoomomo Apr 4, 2023
56f57ef
clean code
Kukoomomo Apr 4, 2023
d21c615
Change default challenge verify config (#797)
Sha3nS Apr 6, 2023
a262554
[fix]: fix merge conflicts
Sha3nS Apr 6, 2023
f86bfa2
[fix]: fix resolve conflicts
Sha3nS Apr 6, 2023
3d72c00
Feature/fraud proof merge release0.3.1 (#800)
Sha3nS Apr 6, 2023
b2d41e7
Add fraud stake and white list init tasks
Kukoomomo Apr 7, 2023
fe75bd3
add address manager set task
Kukoomomo Apr 7, 2023
0abdfce
Add fraud stake and white list init tasks (#801)
Sha3nS Apr 7, 2023
532ee82
[fix]: fix merge 0.3.1
Sha3nS Apr 13, 2023
7300e25
[fix]: fix merge conflicts
Sha3nS Apr 13, 2023
dd09fd2
Merge branch 'feature/fraud-proof' into feature/fraud-proof-fix-merge…
Sha3nS Apr 13, 2023
f2a2fc5
Feature/fraud proof fix merge0.3.1 (#806)
Sha3nS Apr 13, 2023
87cc20f
[fix]: fix flag
Sha3nS Apr 13, 2023
d77e4d3
[fix]: update task
Sha3nS Apr 13, 2023
bcb7fd7
Merge branch 'feature/fraud-proof' into Release/v0.4.0
Sha3nS Apr 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ yarn-error.log
package-lock.json

dist
abi
artifacts
cache

Expand Down Expand Up @@ -56,5 +57,5 @@ mantle.iml

ops/data/**
dist/

packages/contracts/test/data/
packages/contracts/abi/
12 changes: 6 additions & 6 deletions batch-submitter/batch_submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ package batchsubmitter

import (
"context"
ethc "github.com/ethereum/go-ethereum/common"
"github.com/mantlenetworkio/mantle/l2geth/common"
"os"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/getsentry/sentry-go"
"github.com/mantlenetworkio/mantle/batch-submitter/drivers/proposer"
Expand All @@ -17,6 +13,8 @@ import (
"github.com/mantlenetworkio/mantle/bss-core/metrics"
"github.com/mantlenetworkio/mantle/bss-core/txmgr"
"github.com/urfave/cli"
"os"
"time"
)

// Main is the entrypoint into the batch submitter service. This method returns
Expand Down Expand Up @@ -135,7 +133,7 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
MaxTxSize: cfg.MaxL1TxSize,
MaxPlaintextBatchSize: cfg.MaxPlaintextBatchSize,
DaUpgradeBlock: cfg.DaUpgradeBlock,
DAAddr: ethc.Address(common.HexToAddress(cfg.DAAddress)),
DAAddr: common.Address(common.HexToAddress(cfg.DAAddress)),
CTCAddr: ctcAddress,
ChainID: chainID,
PrivKey: sequencerPrivKey,
Expand Down Expand Up @@ -166,8 +164,10 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
MaxStateRootElements: cfg.MaxStateRootElements,
SCCAddr: sccAddress,
CTCAddr: ctcAddress,
FPRollupAddr: common.HexToAddress(cfg.FPRollupAddress),
ChainID: chainID,
PrivKey: proposerPrivKey,
SccRollback: cfg.EnableSccRollback,
})
if err != nil {
return err
Expand Down
7 changes: 7 additions & 0 deletions batch-submitter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type Config struct {
// SCCAddress is the SCC contract address.
SCCAddress string

// FPRollupAddress is the fraud proof rollup contract address.
FPRollupAddress string

// MinL1TxSize is the minimum size in bytes of any L1 transactions generated
// by the batch submitter.
MinL1TxSize uint64
Expand Down Expand Up @@ -201,6 +204,8 @@ type Config struct {

// DisableHTTP2 disables HTTP2 support.
DisableHTTP2 bool

EnableSccRollback bool
}

// NewConfig parses the Config from the provided flags or environment variables.
Expand All @@ -217,6 +222,7 @@ func NewConfig(ctx *cli.Context) (Config, error) {
DAAddress: ctx.GlobalString(flags.DaAddressFlag.Name),
CTCAddress: ctx.GlobalString(flags.CTCAddressFlag.Name),
SCCAddress: ctx.GlobalString(flags.SCCAddressFlag.Name),
FPRollupAddress: ctx.GlobalString(flags.FPRollupAddressFlag.Name),
MinL1TxSize: ctx.GlobalUint64(flags.MinL1TxSizeFlag.Name),
MaxL1TxSize: ctx.GlobalUint64(flags.MaxL1TxSizeFlag.Name),
MaxPlaintextBatchSize: ctx.GlobalUint64(flags.MaxPlaintextBatchSizeFlag.Name),
Expand Down Expand Up @@ -249,6 +255,7 @@ func NewConfig(ctx *cli.Context) (Config, error) {
MetricsHostname: ctx.GlobalString(flags.MetricsHostnameFlag.Name),
MetricsPort: ctx.GlobalUint64(flags.MetricsPortFlag.Name),
DisableHTTP2: ctx.GlobalBool(flags.HTTP2DisableFlag.Name),
EnableSccRollback: ctx.GlobalBool(flags.SccRollbackFlag.Name),
}

err := ValidateConfig(&cfg)
Expand Down
Loading