Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

deps: bump app to v1.0.0-rc2 #381

Merged
merged 8 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 2 additions & 5 deletions cmd/qgb/deploy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,8 @@ func getStartingValset(ctx context.Context, querier *rpc.AppQuerier, startingNon
if attestation == nil {
return nil, types.ErrNilAttestation
}
if attestation.Type() == types.ValsetRequestType {
value, ok := attestation.(*types.Valset)
if !ok {
return nil, ErrUnmarshallValset
}
value, ok := attestation.(*types.Valset)
if ok {
return value, nil
}
return querier.QueryLastValsetBeforeNonce(ctx, nonce)
Expand Down
44 changes: 14 additions & 30 deletions cmd/qgb/query/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,9 @@ func getSignaturesAndPrintThem(
return celestiatypes.ErrAttestationNotFound
}

switch att.Type() {
case celestiatypes.ValsetRequestType:
vs, ok := att.(*celestiatypes.Valset)
if !ok {
return errors.Wrap(celestiatypes.ErrAttestationNotValsetRequest, strconv.FormatUint(nonce, 10))
}
signBytes, err := vs.SignBytes()
switch castedAtt := att.(type) {
case *celestiatypes.Valset:
signBytes, err := castedAtt.SignBytes()
if err != nil {
return err
}
Expand All @@ -193,20 +189,16 @@ func getSignaturesAndPrintThem(
return err
}
}
case celestiatypes.DataCommitmentRequestType:
dc, ok := att.(*celestiatypes.DataCommitment)
if !ok {
return errors.Wrap(types.ErrAttestationNotDataCommitmentRequest, strconv.FormatUint(nonce, 10))
}
case *celestiatypes.DataCommitment:
commitment, err := tmQuerier.QueryCommitment(
ctx,
dc.BeginBlock,
dc.EndBlock,
castedAtt.BeginBlock,
castedAtt.EndBlock,
)
if err != nil {
return err
}
dataRootHash := types.DataCommitmentTupleRootSignBytes(big.NewInt(int64(dc.Nonce)), commitment)
dataRootHash := types.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment)
confirms, err := p2pQuerier.QueryDataCommitmentConfirms(ctx, *lastValset, nonce, dataRootHash.Hex())
if err != nil {
return err
Expand Down Expand Up @@ -447,13 +439,9 @@ func getSignatureAndPrintIt(
return celestiatypes.ErrAttestationNotFound
}

switch att.Type() {
case celestiatypes.ValsetRequestType:
vs, ok := att.(*celestiatypes.Valset)
if !ok {
return errors.Wrap(celestiatypes.ErrAttestationNotValsetRequest, strconv.FormatUint(nonce, 10))
}
signBytes, err := vs.SignBytes()
switch castedAtt := att.(type) {
case *celestiatypes.Valset:
signBytes, err := castedAtt.SignBytes()
if err != nil {
return err
}
Expand All @@ -466,20 +454,16 @@ func getSignatureAndPrintIt(
} else {
logger.Info("found orchestrator signature", "nonce", nonce, "evm_address", evmAddress, "signature", confirm.Signature)
}
case celestiatypes.DataCommitmentRequestType:
dc, ok := att.(*celestiatypes.DataCommitment)
if !ok {
return errors.Wrap(types.ErrAttestationNotDataCommitmentRequest, strconv.FormatUint(nonce, 10))
}
case *celestiatypes.DataCommitment:
commitment, err := tmQuerier.QueryCommitment(
ctx,
dc.BeginBlock,
dc.EndBlock,
castedAtt.BeginBlock,
castedAtt.EndBlock,
)
if err != nil {
return err
}
dataRootHash := types.DataCommitmentTupleRootSignBytes(big.NewInt(int64(dc.Nonce)), commitment)
dataRootHash := types.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment)
confirm, err := p2pQuerier.QueryDataCommitmentConfirmByEVMAddress(ctx, nonce, evmAddress, dataRootHash.Hex())
if err != nil {
return err
Expand Down
7 changes: 4 additions & 3 deletions e2e/Dockerfile_e2e
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ RUN make build

# rebuild the celestia-app binary
WORKDIR /opt
RUN git clone https://github.com/celestiaorg/celestia-app && cd celestia-app && git checkout 41ebe6b1f208
RUN git clone https://github.com/celestiaorg/celestia-app && cd celestia-app && git checkout v1.0.0-rc2
WORKDIR /opt/celestia-app
# set timeout propose to 1s and timeout commit to 1ms
RUN sed -i 's#time.Second#time.Millisecond#g' pkg/appconsts/consensus_consts.go
RUN sed -i 's#10#1#g' pkg/appconsts/consensus_consts.go
RUN sed -i 's#15#1#g' pkg/appconsts/consensus_consts.go
RUN sed -i 's#TimeoutPropose[[:space:]]=[[:space:]]time.Millisecond[[:space:]]\*[[:space:]]1#TimeoutPropose = time.Second#g' pkg/appconsts/consensus_consts.go
RUN sed -i 's#time.Millisecond#50*time.Millisecond#g' pkg/appconsts/consensus_consts.go
RUN make build

# final image
FROM alpine:3.17.2
FROM alpine:3.18.0
# hadolint ignore=DL3018
RUN apk update && apk --no-cache add bash
RUN apk update && apk --no-cache add bash jq coreutils curl

COPY --from=builder /orchestrator-relayer/build/qgb /bin/qgb
COPY --from=builder /opt/celestia-app/build/celestia-appd /bin/celestia-appd
Expand Down
52 changes: 37 additions & 15 deletions e2e/celestia-app/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or
# relative to the home directory (e.g. "data"). The home directory is
# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable
# "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable
# or --home cmd flag.

#######################################################################
### Main Base Config Options ###
#######################################################################

# TCP or UNIX socket address of the ABCI application,
# or the name of an ABCI application compiled in with the Tendermint binary
# or the name of an ABCI application compiled in with the CometBFT binary
proxy_app = "tcp://127.0.0.1:26658"

# A custom human readable name for this node
Expand Down Expand Up @@ -63,7 +63,7 @@ priv_validator_key_file = "config/priv_validator_key.json"
# Path to the JSON file containing the last sign state of a validator
priv_validator_state_file = "data/priv_validator_state.json"

# TCP or UNIX socket address for Tendermint to listen on for
# TCP or UNIX socket address for CometBFT to listen on for
# connections from an external PrivValidator process
priv_validator_laddr = ""

Expand Down Expand Up @@ -176,17 +176,17 @@ max_body_bytes = 8388608
max_header_bytes = 1048576

# The path to a file containing certificate that is used to create the HTTPS server.
# Might be either absolute path or path related to Tendermint's config directory.
# Might be either absolute path or path related to CometBFT's config directory.
# If the certificate is signed by a certificate authority,
# the certFile should be the concatenation of the server's certificate, any intermediates,
# and the CA's certificate.
# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server.
# NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server.
# Otherwise, HTTP server is run.
tls_cert_file = ""

# The path to a file containing matching private key that is used to create the HTTPS server.
# Might be either absolute path or path related to Tendermint's config directory.
# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server.
# Might be either absolute path or path related to CometBFT's config directory.
# NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server.
# Otherwise, HTTP server is run.
tls_key_file = ""

Expand Down Expand Up @@ -273,10 +273,16 @@ dial_timeout = "3s"
[mempool]

# Mempool version to use:
# 1) "v0" - (default) FIFO mempool.
# 2) "v1" - prioritized mempool.
# 1) "v0" - FIFO mempool.
# 2) "v1" - (default) prioritized mempool.
# 3) "v2" - content addressable transaction pool
version = "v1"

# Recheck (default: true) defines whether CometBFT should recheck the
# validity for all remaining transaction in the mempool after a block.
# Since a block affects the application state, some transactions in the
# mempool may become invalid. If this does not apply to your application,
# you can disable rechecking.
recheck = true
broadcast = true
wal_dir = ""
Expand Down Expand Up @@ -388,10 +394,10 @@ timeout_prevote_delta = "1ms"
timeout_precommit = "10ms"
# How much the timeout_precommit increases with each round
timeout_precommit_delta = "1ms"
# How long we wait after committing a block, before starting on the new
# height (this gives us a chance to receive some more precommits, even
# though we already have +2/3).
timeout_commit = "10s"
# TargetHeigtDuration is used to determine how long we wait after a
# block is committed. If this time is shorter than the actual time to reach
# consensus for that height, then we do not wait at all.
target_height_duration = "1ms"

# How many blocks to look back to check existence of the node's consensus votes before joining consensus
# When non-zero, the node will panic upon restart
Expand Down Expand Up @@ -432,7 +438,7 @@ discard_abci_responses = false
# to decide which txs to index based on configuration set in the application.
#
# Options:
# 1) "null"
# 1) "kv"
# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend).
# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed.
# 3) "psql" - the indexer services backed by PostgreSQL.
Expand Down Expand Up @@ -463,4 +469,20 @@ prometheus_listen_addr = ":26660"
max_open_connections = 3

# Instrumentation namespace
namespace = "tendermint"
namespace = "cometbft"

# The URL of the influxdb instance to use for remote event
# collection. If empty, remote event collection is disabled.
influx_url = ""

# The influxdb token to use for remote event collection.
influx_token = ""

# The influxdb bucket to use for remote event collection.
influx_bucket = "e2e"

# The influxdb org to use for event remote collection.
influx_org = "celestia"

# The size of the batches that are sent to the database.
influx_batch_size = 20
40 changes: 20 additions & 20 deletions e2e/celestia-app/genesis.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"genesis_time": "2023-02-25T08:11:57.275986192Z",
"genesis_time": "2023-06-07T14:24:01.153904426Z",
"chain_id": "qgb-e2e",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_bytes": "1974272",
"max_gas": "-1",
"time_iota_ms": "1000"
"time_iota_ms": "1"
},
"evidence": {
"max_age_num_blocks": "100000",
Expand All @@ -18,7 +18,9 @@
"ed25519"
]
},
"version": {}
"version": {
"app_version": "1"
}
},
"app_hash": "",
"app_state": {
Expand Down Expand Up @@ -61,6 +63,9 @@
}
]
},
"authz": {
"authorization": []
},
"bank": {
"params": {
"send_enabled": [],
Expand Down Expand Up @@ -138,7 +143,8 @@
},
"blob": {
"params": {
"gas_per_blob_byte": 8
"gas_per_blob_byte": 8,
"gov_max_square_size": "64"
}
},
"capability": {
Expand All @@ -154,8 +160,8 @@
"distribution": {
"params": {
"community_tax": "0.020000000000000000",
"base_proposer_reward": "0.010000000000000000",
"bonus_proposer_reward": "0.040000000000000000",
"base_proposer_reward": "0.000000000000000000",
"bonus_proposer_reward": "0.000000000000000000",
"withdraw_addr_enabled": true
},
"fee_pool": {
Expand Down Expand Up @@ -251,7 +257,7 @@
"deposit_params": {
"min_deposit": [
{
"denom": "stake",
"denom": "utia",
"amount": "10000000"
}
],
Expand Down Expand Up @@ -301,16 +307,11 @@
},
"mint": {
"minter": {
"inflation": "0.130000000000000000",
"annual_provisions": "0.000000000000000000"
},
"params": {
"mint_denom": "utia",
"inflation_rate_change": "0.130000000000000000",
"inflation_max": "0.200000000000000000",
"inflation_min": "0.070000000000000000",
"goal_bonded": "0.670000000000000000",
"blocks_per_year": "6311520"
"inflation_rate": "0.080000000000000000",
"annual_provisions": "0.000000000000000000",
"genesis_time": "1970-01-01T00:00:00Z",
"previous_block_time": null,
"bond_denom": "utia"
}
},
"params": null,
Expand Down Expand Up @@ -355,7 +356,6 @@
"receive_enabled": true
}
},
"upgrade": {},
"vesting": {}
}
}
}
Loading