Skip to content

Commit

Permalink
Feat/rollback (#38)
Browse files Browse the repository at this point in the history
* add opinit pulsar

* bug fix: add fee param as undefined to adjust sendtx change

* proto api update

* delete output proposal only if it is not finalized

* add ophost autocli query

* change executor's validator at end blocker according to executor change plan preset

* batch executor send last block's commit appending end of blocks bulk

* add last finalized output querier to ophost

* rpc raw commit param height

* change old executor's conspower as -1 to let comet know if executor is changed

* batch submitter to celestia send tx to celestia consensus node instead of DA light node

* delete all validators & set next executor's validator

* add batch info to bridge config

* emit and return finalized output index, l2 blocknumber when updating proposer, challenger, batchinfo

* emit finalized output event

* add tests and minor type fixes (#39)

* register denom metadata

* fix tests

* register base denom and fix claim response

* add l1 denom in resurrector

* add executor monitor start height

* bug fix: add fee param as undefined to adjust sendtx change

* delete output proposal only if it is not finalized

* add tests

* add tests and minor type fixes

* validate bridge config before update

* enforce to set batch info

* fix error message

* cleanup

---------

Co-authored-by: JSHan94 <saw151515@gmail.com>
Co-authored-by: ALPAC-4 <81249838+ALPAC-4@users.noreply.github.com>
Co-authored-by: hoon <snghuncha@gmail.com>

* emit batch info events when creating bridge

* return err wrapper when pub key incorrectly set

* ignore api/ from codecov

---------

Co-authored-by: beer-1 <147697694+beer-1@users.noreply.github.com>
Co-authored-by: JSHan94 <saw151515@gmail.com>
Co-authored-by: ALPAC-4 <81249838+ALPAC-4@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 3, 2024
1 parent 66a2781 commit 26ed9a5
Show file tree
Hide file tree
Showing 70 changed files with 48,847 additions and 12,611 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ comment:
ignore:
- "*.md"
- "*.rst"
- "api/"
- "cmd/"
- "contrib/"
- "docs/"
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-all: proto-format proto-lint proto-gen
proto-all: proto-format proto-lint proto-gen proto-pulsar-gen

proto-gen:
@echo "Generating Protobuf files"
@$(protoImage) sh ./scripts/protocgen.sh

proto-pulsar-gen:
@echo "Generating Dep-Inj Protobuf files"
@$(protoImage) sh ./scripts/protocgen-pulsar.sh

proto-format:
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;

Expand All @@ -25,7 +29,7 @@ proto-lint:
proto-check-breaking:
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main

.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking
.PHONY: proto-all proto-gen proto-pulsar-gen proto-format proto-lint proto-check-breaking


###############################################################################
Expand Down
23 changes: 23 additions & 0 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module github.com/initia-labs/OPinit/api

go 1.21

require (
cosmossdk.io/api v0.7.3
github.com/cosmos/cosmos-proto v1.0.0-beta.4
github.com/cosmos/gogoproto v1.4.11
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.32.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
)
33 changes: 33 additions & 0 deletions api/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk=
cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU=
github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co=
github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g=
github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0=
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk=
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 h1:U7+wNaVuSTaUqNvK2+osJ9ejEZxbjHHk8F2b6Hpx0AE=
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
Loading

0 comments on commit 26ed9a5

Please sign in to comment.