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

Feat/oracle #1929

Draft
wants to merge 99 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
1450ca5
feat(sequencer): integrate connect oracle and vote extension logic (#…
noot Nov 6, 2024
6316565
Apply new storage conventions to Connect oracle (#1774)
Fraser999 Nov 6, 2024
1b162c2
chore(sequencer): implement retry logic for connecting to the oracle …
Fraser999 Nov 7, 2024
5f8dae6
refactor: make extended commit info third injected tx (#1791)
noot Nov 18, 2024
263446e
feat(sequencer, core): put extended commit info and proof into `Seque…
noot Nov 20, 2024
3fc5384
feat(sequencer): store currency pair id mapping along with committed …
noot Nov 25, 2024
ed60c03
fix(sequencer): provide unit tests and fixes for vote extensions (#1836)
Fraser999 Nov 27, 2024
77d8a02
chore: merge main branch to oracle feature branch (#1837)
Fraser999 Nov 27, 2024
921fc70
feat(sequencer, core, conductor): pass oracle data to rollup via exec…
noot Dec 4, 2024
80be7eb
fix(core): update `normalize_by_pair` to be optional (#1851)
noot Dec 5, 2024
9a01beb
generalized oracle template and connect sidecar
quasystaty1 Dec 3, 2024
379186b
log vote extension price update
quasystaty1 Dec 4, 2024
f6692a8
working chart
quasystaty1 Dec 4, 2024
68a93e6
cleanup
quasystaty1 Dec 5, 2024
fad027d
fmt
quasystaty1 Dec 5, 2024
59f18ad
use sequencer grpc endpoint
quasystaty1 Dec 5, 2024
0beee9b
chore: merge main branch to oracle feature branch (#1861)
Fraser999 Dec 6, 2024
a3ed038
add AddCurrencyPairs and RemoveCurrencyPairs action types
noot Dec 6, 2024
8089721
merge with main
noot Dec 6, 2024
a65054f
chore: merge main into feature branch (#1866)
noot Dec 10, 2024
8ce3a0d
merge w base
noot Dec 12, 2024
408a010
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/o…
noot Dec 12, 2024
ebe0340
impl Add/RemoveCurrencyPairs
noot Dec 13, 2024
3cc37df
remove num_removed_currency_pairs as we don't need it
noot Dec 13, 2024
533c838
fix clippy
noot Dec 13, 2024
1d909ec
unit tests
noot Dec 13, 2024
436f57d
update snapshots
noot Dec 13, 2024
2da5b5e
fix tests
noot Dec 13, 2024
7bde866
Merge branch 'feat/oracle' of github.com:astriaorg/astria into quasys…
noot Dec 16, 2024
9c43213
bump chart versions
noot Dec 16, 2024
81aa0db
fix charts
noot Dec 16, 2024
fc32a25
update Chart.lock
noot Dec 16, 2024
592cdc3
bump chart versions
noot Dec 16, 2024
ff61241
bump chart versions
noot Dec 16, 2024
916b5d5
maybe fix yaml lint
noot Dec 16, 2024
638c895
maybe fix yaml lint
noot Dec 16, 2024
8a7752d
feat(charts): oracle sidecar (#1854)
noot Dec 16, 2024
bb6f9dc
update genesis chart
noot Dec 18, 2024
9137991
chart cleanup and set values in dev config
noot Dec 18, 2024
f4fea0b
bump chart version
noot Dec 18, 2024
2ab9f37
fix chart dep version
noot Dec 18, 2024
680f4db
dep update
noot Dec 18, 2024
143175e
bump chart version
noot Dec 18, 2024
47d126d
add unit tests
noot Dec 18, 2024
d28c0b5
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/o…
noot Dec 19, 2024
90d15f0
address comments
noot Dec 19, 2024
1791b0b
Merge remote-tracking branch 'upstream/main' into feat/oracle
Fraser999 Dec 23, 2024
49e4c27
update charts
Fraser999 Dec 23, 2024
37e21b0
chore: merge main branch to oracle feature branch (#1886)
Fraser999 Dec 31, 2024
179dc9c
Merge branch 'feat/oracle' into noot/oracle-actions
noot Jan 8, 2025
a21660a
merge
noot Jan 8, 2025
0a03d83
feat(sequencer): implement oracle module actions (#1878)
noot Jan 8, 2025
f9521c9
Merge branch 'feat/oracle' into noot/oracle-geth-tmp
noot Jan 8, 2025
04d93fd
create price feed enum action and nest relevant actions inside
Fraser999 Jan 8, 2025
1180e60
unify currency pairs protobuf types
Fraser999 Jan 16, 2025
c223c28
chore(core, sequencer): Create price feed enum action and nest releva…
Fraser999 Jan 16, 2025
b1b8397
Merge branch 'feat/oracle' into noot/oracle-geth-tmp
noot Jan 17, 2025
0974c1f
feat(charts): update geth charts for oracle genesis values (#1883)
noot Jan 20, 2025
4fdc980
begin spec
noot Jan 21, 2025
90333b2
Merge remote-tracking branch 'upstream/main' into feat/oracle
Fraser999 Jan 22, 2025
c94188c
update sequencer chart version
Fraser999 Jan 23, 2025
5aafff0
chore: merge main branch to oracle feature branch (#1924)
Fraser999 Jan 23, 2025
d23a4e0
work on specs
noot Jan 24, 2025
67939b9
wip spec
noot Jan 31, 2025
3643dc3
app and conductor sections
noot Jan 31, 2025
53b98ce
lint
noot Jan 31, 2025
f34a932
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/o…
noot Feb 3, 2025
75ffc63
lint
noot Feb 3, 2025
e6a00f6
feat(sequencer): add market map actions (#1882)
ethanoroshiba Feb 3, 2025
ac28a94
implement market endpoint
Fraser999 Feb 4, 2025
3736477
chore(sequencer): implement market endpoint (#1946)
Fraser999 Feb 5, 2025
e17fe3d
fix(ci): tag images with full commit sha (#1954)
aajimal Feb 6, 2025
7057387
update put_price_for_currency_pair
noot Feb 10, 2025
b2083b4
fix(sequencer): update `put_price_for_currency_pair` (#1959)
noot Feb 11, 2025
b43d0d8
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/o…
noot Feb 11, 2025
a7a6936
add code links
noot Feb 13, 2025
594689c
add price_update event
noot Feb 13, 2025
585301f
update geth chart and genesis bytecode
noot Feb 18, 2025
4ac1792
bump chart version
noot Feb 18, 2025
a8f4918
bump chart version
noot Feb 18, 2025
f36dd0c
bump chart version
noot Feb 18, 2025
0c3ea35
update geth devTag
noot Feb 19, 2025
48da5c0
update geth devTag
noot Feb 19, 2025
bf2dedd
lint chart
noot Feb 19, 2025
ca1cbf2
lint chart
noot Feb 19, 2025
831e0cb
charts: update geth chart and genesis bytecode (#1979)
noot Feb 19, 2025
625f4a8
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/t…
noot Feb 19, 2025
913efdb
address comments
noot Feb 19, 2025
0f8ad19
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/o…
noot Feb 19, 2025
7cd711b
specs: add oracle specification doc (#1941)
noot Feb 19, 2025
53388c0
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/t…
noot Feb 20, 2025
44864d9
add unit test to ensure event is returned in finalize_block
noot Feb 20, 2025
6d0dcd6
add Int128 proto type
noot Feb 20, 2025
db259d6
update sequencer to handle i128 price
noot Feb 20, 2025
af3bd75
add test
noot Feb 20, 2025
af214fe
feat(sequencer): add `price_update` abci event (#1970)
noot Feb 21, 2025
d739fac
Merge branch 'feat/oracle' of github.com:astriaorg/astria into noot/n…
noot Feb 24, 2025
f89e1ee
address comments
noot Feb 24, 2025
5d8c66b
fix(core, proto): use i128 for price instead of u128 (#1991)
noot Feb 24, 2025
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 .github/workflows/reusable-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ jobs:
tags: |
type=ref,event=pr
type=match,pattern=refs/tags/${{ inputs.binary-name }}-v(.*),group=1,enable=${{ startsWith(env.FULL_REF, 'refs/tags/') }},value=${{ env.FULL_REF }}
type=sha
type=sha,format=short
type=sha,format=long
# set the actual commit SHA from the PR head instead of from the PR merge commit (alternatively, we could checkout the PR head in actions/checkout)
type=raw,value=sha-${{ github.event.pull_request.head.sha || github.sha }},enable=${{ startsWith(env.FULL_REF, 'refs/pull/') }}
# set latest tag for `main` branch
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ modules:
ignore_only:
PACKAGE_VERSION_SUFFIX:
- proto/protocolapis/astria_vendored/tendermint
ENUM_ZERO_VALUE_SUFFIX:
- proto/protocolapis/astria_vendored/tendermint
disallow_comment_ignores: true
breaking:
use:
Expand Down
2 changes: 1 addition & 1 deletion charts/celestia-local/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.1
version: 0.7.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/celestia-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.0
version: 0.4.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.1
version: 1.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 3 additions & 1 deletion charts/evm-rollup/files/genesis/geth-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
"astriaBridgeAddresses": {{ toPrettyJson .Values.genesis.bridgeAddresses | indent 8 | trim }},
"astriaFeeCollectors": {{ toPrettyJson .Values.genesis.feeCollectors | indent 8 | trim }},
"astriaEIP1559Params": {{ toPrettyJson .Values.genesis.eip1559Params | indent 8 | trim }},
"astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}"
"astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}",
{{- if not .Values.global.dev }}
{{- else }}
"astriaOracleCallerAddress": "{{ .Values.genesis.astriaOracleCallerAddress }}",
"astriaOracleContractAddress": "{{ .Values.genesis.astriaOracleContractAddress }}"
{{- end }}
},
"difficulty": "0",
Expand Down
20 changes: 16 additions & 4 deletions charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ images:
repo: ghcr.io/astriaorg/astria-geth
pullPolicy: IfNotPresent
tag: 1.0.0
devTag: latest
devTag: sha-7ded202
overrideTag: ""
conductor:
repo: ghcr.io/astriaorg/conductor
pullPolicy: IfNotPresent
tag: 1.0.0
devTag: latest

devTag: pr-1866

genesis:
## These values are used to configure the genesis block of the rollup chain
Expand Down Expand Up @@ -57,6 +56,14 @@ genesis:
# senderAddress: "0x0000000000000000000000000000000000000000"
# assetPrecision: 9

## Native oracle configuration

# address from which injected oracle transactions are called from;
# must not have a known private key for mainnet
astriaOracleCallerAddress: "0x0000000000000000000000000000000000000088"
# address where the oracle contract is deployed at (at genesis)
# must match the `alloc` genesis field
astriaOracleContractAddress: "0x0000000000000000000000000000000000000089"

## Fee configuration

Expand Down Expand Up @@ -89,6 +96,10 @@ genesis:
value:
balance: "0"
code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3"
- address: "0x0000000000000000000000000000000000000089" ## oracle contract
value:
balance: "0"
code: "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063abcdd06911610066578063abcdd0691461021a578063dad84e9d1461023d578063f2fde38b1461029a578063f6dad934146102ad57600080fd5b80638da5cb5b146101d257806395009a53146101e35780639c97f6d8146101f657600080fd5b806348832f3c116100c857806348832f3c1461015f578063715018a614610172578063859bd5b51461017a578063888810c9146101bf57600080fd5b806338013f02146100ef5780633a6a7162146101335780634599c78814610148575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000008881565b6040516001600160a01b0390911681526020015b60405180910390f35b610146610141366004610865565b6102c0565b005b61015160045481565b60405190815260200161012a565b61014661016d366004610891565b6103da565b6101466104ea565b6101a66101883660046108c7565b60026020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff90911660208301520161012a565b6101466101cd3660046108e0565b6104fe565b6000546001600160a01b0316610116565b6101466101f13660046109e6565b610524565b60005461020a90600160a01b900460ff1681565b604051901515815260200161012a565b61020a6102283660046108c7565b60016020526000908152604090205460ff1681565b61027b61024b366004610a9f565b6003602090815260009283526040808420909152908252902080546001909101546001600160801b039091169082565b604080516001600160801b03909316835260208301919091520161012a565b6101466102a8366004610ac1565b610768565b6101466102bb3660046108c7565b6107a6565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000008816146103115760405162461bcd60e51b815260040161030890610aea565b60405180910390fd5b4360045560008281526002602052604090205460ff166103475760405163183c4ba760e01b815260006004820152602401610308565b6040805180820182526001600160801b038381168083524260208085019182526004546000908152600382528681208982528252869020945185546001600160801b0319169416939093178455516001909301929092558251858152908101919091527fd616ae5f8d378c1264fdbbbc72af91e16e3645564d7eae37e267ef1c67bf5cee91015b60405180910390a15050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000008816146104225760405162461bcd60e51b815260040161030890610aea565b600054600160a01b900460ff16801561044a575060008281526001602052604090205460ff16155b1561046b5760405163401e592360e01b815260048101839052602401610308565b6040805180820182526001815260ff838116602080840182815260008881526002835286902094518554915161ffff1990921690151561ff001916176101009190941602929092179092558251858152908101919091527f675b5c62c7826a107baf315a10339c41c59f32f58ac6431f359e9ac89c64a01b91016103ce565b6104f26107cc565b6104fc60006107f9565b565b6105066107cc565b60008054911515600160a01b0260ff60a01b19909216919091179055565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000088161461056c5760405162461bcd60e51b815260040161030890610aea565b80518251146105cd5760405162461bcd60e51b815260206004820152602760248201527f63757272656e6379207061697220616e64207072696365206c656e677468206d6044820152660d2e6dac2e8c6d60cb1b6064820152608401610308565b4360045560005b825181101561076357600260008483815181106105f3576105f3610b2e565b60209081029190910181015182528101919091526040016000205460ff166106315760405163183c4ba760e01b815260048101829052602401610308565b604051806040016040528083838151811061064e5761064e610b2e565b60200260200101516001600160801b0316815260200142815250600360006004548152602001908152602001600020600085848151811061069157610691610b2e565b602090810291909101810151825281810192909252604001600020825181546001600160801b0319166001600160801b0390911617815591015160019091015582517fd616ae5f8d378c1264fdbbbc72af91e16e3645564d7eae37e267ef1c67bf5cee9084908390811061070757610707610b2e565b602002602001015183838151811061072157610721610b2e565b60200260200101516040516107499291909182526001600160801b0316602082015260400190565b60405180910390a18061075b81610b44565b9150506105d4565b505050565b6107706107cc565b6001600160a01b03811661079a57604051631e4fbdf760e01b815260006004820152602401610308565b6107a3816107f9565b50565b6107ae6107cc565b6000908152600160208190526040909120805460ff19169091179055565b6000546001600160a01b031633146104fc5760405163118cdaa760e01b8152336004820152602401610308565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160801b038116811461086057600080fd5b919050565b6000806040838503121561087857600080fd5b8235915061088860208401610849565b90509250929050565b600080604083850312156108a457600080fd5b82359150602083013560ff811681146108bc57600080fd5b809150509250929050565b6000602082840312156108d957600080fd5b5035919050565b6000602082840312156108f257600080fd5b8135801515811461090257600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561094857610948610909565b604052919050565b600067ffffffffffffffff82111561096a5761096a610909565b5060051b60200190565b600082601f83011261098557600080fd5b8135602061099a61099583610950565b61091f565b82815260059290921b840181019181810190868411156109b957600080fd5b8286015b848110156109db576109ce81610849565b83529183019183016109bd565b509695505050505050565b600080604083850312156109f957600080fd5b823567ffffffffffffffff80821115610a1157600080fd5b818501915085601f830112610a2557600080fd5b81356020610a3561099583610950565b82815260059290921b84018101918181019089841115610a5457600080fd5b948201945b83861015610a7257853582529482019490820190610a59565b96505086013592505080821115610a8857600080fd5b50610a9585828601610974565b9150509250929050565b60008060408385031215610ab257600080fd5b50508035926020909101359150565b600060208284031215610ad357600080fd5b81356001600160a01b038116811461090257600080fd5b60208082526024908201527f4173747269614f7261636c653a206f6e6c79206f7261636c652063616e2075706040820152636461746560e01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201610b6457634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212203dba20374b20748c9e2f92d4416b253adb31e624e5086145f955c848297d924c64736f6c63430008150033"
# Example of simple genesis account funding
# - address: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
# value:
Expand Down Expand Up @@ -159,7 +170,8 @@ config:
condition: .Values.metrics.enabled
- name: txpool.nolocals
value: "true"

- name: verbosity
value: "4" # 3=info, 4=debug

conductor:
# Determines what will drive block execution, options are:
Expand Down
8 changes: 4 additions & 4 deletions charts/evm-stack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies:
- name: celestia-node
repository: file://../celestia-node
version: 0.4.0
version: 0.4.1
- name: evm-rollup
repository: file://../evm-rollup
version: 1.0.1
version: 1.2.0
- name: composer
repository: file://../composer
version: 1.0.0
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: blockscout-stack
repository: https://blockscout.github.io/helm-charts
version: 1.6.8
digest: sha256:371c35af96fc5d82aa2b4d894dc7d2e11e150380fd6f09eb0ca94b4202b24698
generated: "2025-01-08T11:22:41.273867-08:00"
digest: sha256:0264763bccb70e719cba335adf68e78937b18a421cc7aca747a8a0e8a9b0343a
generated: "2025-02-18T15:41:14.204535563-05:00"
6 changes: 3 additions & 3 deletions charts/evm-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.7
version: 1.1.1

dependencies:
- name: celestia-node
version: 0.4.0
version: 0.4.1
repository: "file://../celestia-node"
condition: celestia-node.enabled
- name: evm-rollup
version: 1.0.1
version: 1.2.0
repository: "file://../evm-rollup"
- name: composer
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion charts/hermes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.2
version: 0.5.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
repository: file://../sequencer-relayer
version: 1.0.1
digest: sha256:3b3ce65ff473606fcc86027653cadd212ba45ac8b39d5806d713b48f695ad235
generated: "2024-11-20T11:24:11.85775+02:00"
generated: "2024-12-23T18:31:36.564565164Z"
2 changes: 1 addition & 1 deletion charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.2
version: 1.0.5
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer/files/cometbft/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ grpc_laddr = ""
# 0 - unlimited.
# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
# 1024 - 40 - 10 - 50 = 924 = ~900
grpc_max_open_connections = {{ .Values.cometbft.config.grpc.maxOpenConnections }}
grpc_max_open_connections = {{ .Values.cometbft.config.grpc.maxOpenConnections }}

# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
unsafe = false
Expand Down
76 changes: 73 additions & 3 deletions charts/sequencer/files/cometbft/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
{{- if $index }},{{- end }}
{
"address": {{ include "sequencer.address" $value.address }},
"balance": {{ include "sequencer.toUint128Proto" ( toString $value.balance | replace "\"" "" ) }}
"balance": {{ include "sequencer.toUint128Proto" ( toString $value.balance | replace "\"" "" ) }}
}
{{- end }}
],
Expand All @@ -119,11 +119,78 @@
{{- if $index }},{{- end }}
{{ include "sequencer.address" $value }}
{{- end }}
]
],
{{- if not .Values.global.dev }}
{{- else }}
{{- end}}
"connect": {
"marketMap": {
"marketMap": {
"markets": {
{{- range $index, $market := .Values.sequencer.oracle.markets }}
{{- if $index }},{{- end }}
"{{ $market.name }}": {
"providerConfigs": [
{{- range $providerIndex, $provider := $market.providerConfigs }}
{{- if $providerIndex }},{{- end }}
{
"name": "{{ $provider.name }}",
{{- if $provider.normalizeByPair }}
"normalizeByPair": {
"Base": "{{ $provider.normalizeByPair.Base }}",
"Quote": "{{ $provider.normalizeByPair.Quote }}"
},
{{- end }}
"offChainTicker": "{{ $provider.offChainTicker }}"
}
{{- end }}
],
"ticker": {
"currencyPair": {
"Base": "{{ $market.ticker.currencyPair.Base }}",
"Quote": "{{ $market.ticker.currencyPair.Quote }}"
},
"decimals": "{{ $market.ticker.decimals }}",
"enabled": {{ $market.ticker.enabled }},
"minProviderCount": "{{ $market.ticker.minProviderCount }}"
}
}
{{- end }}
}
},
"params": {
"admin": "{{ .Values.genesis.oracle.marketAdminAddress }}",
"marketAuthorities": [
{{- range $index, $authority := .Values.genesis.oracle.marketAuthorities }}
{{- if $index }},{{- end }}
"{{ $authority }}"
{{- end }}
]
}
},
"oracle": {
"currencyPairGenesis": [
{{- range $index, $genesis := .Values.sequencer.oracle.currencyPairGenesis }}
{{- if $index }},{{- end }}
{
"currencyPair": {
"Base": "{{ $genesis.currencyPair.Base }}",
"Quote": "{{ $genesis.currencyPair.Quote }}"
},
"currencyPairPrice": {
"blockTimestamp": "{{ $genesis.currencyPairPrice.blockTimestamp }}",
"price": "{{ $genesis.currencyPairPrice.price }}"
}
{{- if $genesis.id }},
"id": "{{ $genesis.id }}"
{{- end }}
}
{{- end }}
],
"nextId": "{{ .Values.sequencer.oracle.nextId }}"
}
}
},
{{- end}}
"chain_id": "{{ .Values.genesis.chainId }}",
"consensus_params": {
"block": {
Expand All @@ -142,6 +209,9 @@
},
"version": {
"app": "0"
},
"abci": {
"vote_extensions_enable_height": "{{ .Values.genesis.consensusParams.voteExtensionsEnableHeight }}"
}
},
"genesis_time": "{{ .Values.genesis.genesisTime }}",
Expand Down
38 changes: 38 additions & 0 deletions charts/sequencer/files/scripts/markets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"markets": {
"BTC/USD": {
"ticker": {
"currency_pair": {
"Base": "BTC",
"Quote": "USD"
},
"decimals": 5,
"min_provider_count": 1,
"enabled": true
},
"provider_configs": [
{
"name": "coingecko_api",
"off_chain_ticker": "bitcoin/usd"
}
]
},
"ETH/USD": {
"ticker": {
"currency_pair": {
"Base": "ETH",
"Quote": "USD"
},
"decimals": 6,
"min_provider_count": 1,
"enabled": true
},
"provider_configs": [
{
"name": "coingecko_api",
"off_chain_ticker": "ethereum/usd"
}
]
}
}
}
3 changes: 3 additions & 0 deletions charts/sequencer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Namepsace to deploy elements into.
{{- define "cometBFT.image" -}}
{{ .Values.images.cometBFT.repo }}:{{ if .Values.global.dev }}{{ .Values.images.cometBFT.devTag }}{{ else }}{{ .Values.images.cometBFT.tag }}{{ end }}
{{- end }}
{{- define "connect.image" -}}
{{ .Values.images.connect.repo }}:{{ if .Values.global.dev }}{{ .Values.images.connect.devTag }}{{ else }}{{ .Values.images.connect.tag }}{{ end }}
{{- end }}

{{/*
Return if ingress is stable.
Expand Down
8 changes: 8 additions & 0 deletions charts/sequencer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ metadata:
data:
init-cometbft.sh: |
{{- tpl (.Files.Get "files/scripts/init-cometbft.sh") $ | nindent 4 }}
{{- if not .Values.global.dev }}
{{- else }}
markets.json: |
{{- tpl (.Files.Get "files/scripts/markets.json") $ | nindent 4 }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -75,5 +80,8 @@ data:
OTEL_SERVICE_NAME: "{{ tpl .Values.sequencer.otel.serviceName . }}"
{{- if not .Values.global.dev }}
{{- else }}
ASTRIA_SEQUENCER_NO_ORACLE: "{{ not .Values.sequencer.oracle.enabled }}"
ASTRIA_SEQUENCER_ORACLE_GRPC_ADDR: "http://127.0.0.1:{{ .Values.ports.oracleGrpc }}"
ASTRIA_SEQUENCER_ORACLE_CLIENT_TIMEOUT_MILLISECONDS: "{{ .Values.sequencer.oracle.clientTimeout }}"
{{- end }}
---
Loading
Loading