Skip to content

Commit

Permalink
Merge branch 'develop' into revert-libzkp-update
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed May 30, 2024
2 parents a406918 + 094a67a commit dabb4d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/l2geth_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
uses: actions/checkout@v2
- name: Build
run: |
make libzkp
sudo cp ./rollup/circuitcapacitychecker/libzkp/libzkp.so /usr/local/lib/
sudo cp ./rollup/circuitcapacitychecker/libzkp/libzktrie.so /usr/local/lib/
make geth
check:
if: github.event.pull_request.draft == false
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ nccc_geth: libzstd ## geth without circuit capacity checker
@echo "Run \"$(GOBIN)/geth\" to launch geth."

geth: libzkp libzstd
$(GORUN) build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth
@sudo cp $(PWD)/rollup/circuitcapacitychecker/libzkp/libzkp.so $(SCROLL_LIB_PATH)
@LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(SCROLL_LIB_PATH)" CGO_LDFLAGS="-L$(SCROLL_LIB_PATH) -Wl,-rpath,$(SCROLL_LIB_PATH)" $(GORUN) build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."

Expand Down
6 changes: 3 additions & 3 deletions rollup/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,16 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
var deadlineReached bool

go func() {
deadlineTimer := time.NewTimer(time.Until(deadline))
defer func() {
close(resultCh)
deadlineTimer.Stop()
lifetimeTimer.UpdateSince(p.start)
}()
for {
idleStart := time.Now()
select {
case <-time.After(time.Until(deadline)):
case <-deadlineTimer.C:
cccIdleTimer.UpdateSince(idleStart)
// note: currently we don't allow empty blocks, but if we ever do; make sure to CCC check it first
if lastCandidate != nil {
Expand All @@ -328,8 +330,6 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
return
}
deadlineReached = true
// avoid deadline case being triggered again and again
deadline = time.Now().Add(time.Hour)
case candidate := <-candidates:
cccIdleTimer.UpdateSince(idleStart)
cccStart := time.Now()
Expand Down

0 comments on commit dabb4d5

Please sign in to comment.