-
Notifications
You must be signed in to change notification settings - Fork 205
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
Index incoming tokens #6736
base: feat/chain-go-sdk
Are you sure you want to change the base?
Index incoming tokens #6736
Conversation
# Conflicts: # cmd/sovereignnode/go.mod # cmd/sovereignnode/go.sum # go.mod # go.sum
cmd/node/config/external.toml
Outdated
@@ -15,6 +15,17 @@ | |||
# ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations", "esdts"] | |||
EnabledIndexes = ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations", "esdts"] | |||
|
|||
# MainChainElasticSearchConnector defines settings related to ElasticSearch such as login information or URL | |||
[MainChainElasticSearchConnector] | |||
## We do not recommend to activate this indexer on a validator node since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use ##
and no spacing after each #
below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy-pasted from above 😄
- updated
#the indexer is called synchronously and might block due to external causes. | ||
#Strongly suggested to activate this on a regular observer node. | ||
Enabled = false | ||
URL = "http://localhost:9201" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give an example here in the comment with a link to the public es link from our mainnet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not put it here, I don't think is necessary. The deploy scripts update this automatically
EventNotifierConnector EventNotifierConfig | ||
HostDriversConfig []HostDriversConfig | ||
ElasticSearchConnector ElasticSearchConfig | ||
MainChainElasticSearchConnector MainChainElasticSearchConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a preference, if you add something new, can you please MainChainElasticSearchConnector
at the end of the struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the sections order from the .toml file...
@@ -64,6 +66,7 @@ type statusComponentsFactory struct { | |||
cryptoComponents factory.CryptoComponentsHolder | |||
isInImportMode bool | |||
isSovereign bool | |||
esdtPrefix string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Pass esdPrefix
all the way down to here? Don't you already have the whole config in statusComponentsFactory
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just the GeneralConfig
, and I needed SystemSCConfig
for the prefix.
@@ -8,6 +8,7 @@ WALLET="~/wallet.pem" | |||
WALLET_SOVEREIGN="~/MultiversX/testnet/node/config/walletKey.pem" | |||
|
|||
#=========== NETWORK CONFIGURATION =========== | |||
MAIN_CHAIN_ELASTIC=https://testnet-index.multiversx.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this config be automatically updated to mainnet/devnet elastic link if we change the script configuration chain ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHAIN_ID
is not changing the PROXY
or MAIN_CHAIN_ELASTIC
URL. It needs to be changed manually.
section_found = True | ||
if section_found and key in line: | ||
line = re.sub(rf'({re.escape(key)}\s*=\s*)".*?"', rf'\1"{value}"', line) | ||
section_found = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why set this to False if you don't use it afterwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will skip the second if
and will not check key in line
every time.
Reasoning behind the pull request
Proposed changes
MainChainElasticSearchConnector
inexternal.toml
ESDTPrefix
andElasticConfig
sent as parameter to indexerMainChainElasticSearchConnector
ifUSE_ELASTICSEARCH=1
MainChainElasticSearchConnector.URL
with link fromconfigs.cfg
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?