-
Notifications
You must be signed in to change notification settings - Fork 197
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/index genesis transactions #3639
Conversation
…ctions Index genesis mint transactions
@@ -16,6 +16,7 @@ | |||
{Year = 11, MaximumInflation = 0.0}, | |||
] | |||
Denomination = 18 # represents the smallest eGLD subdivision (10^-X eGLD for a denomination of X) | |||
GenesisMintingSenderAddress = "erd17rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rcqqkhty3" |
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.
== "f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0" in hex
we could have this in the /examples/address_test.go
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.
done
genesis/parsing/accountsParser.go
Outdated
txs := make([]coreData.TransactionHandler, 0, len(ap.initialAccounts)) | ||
|
||
var nonce uint64 = 0 | ||
for _, ia := range ap.initialAccounts { |
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.
for nonce, ia := range ap.initialAccounts {
tx := ap.createMintTransaction(ia, uint64(nonce))
txs = append(txs, tx)
}
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.
done
genesis/parsing/accountsParser.go
Outdated
txsPoolPerShard[receiverShardID].Txs[string(txHash)] = tx | ||
|
||
for _, miniBlock := range miniBlocks { | ||
if (senderShardID == miniBlock.GetSenderShardID()) && |
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.
could have used a bool var. The parenthesis can be removed
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.
done
factory/processComponents.go
Outdated
var indexMiniBlocks = make([]*dataBlock.MiniBlock, 0) | ||
|
||
for _, miniBlock := range miniBlocks { | ||
if (miniBlock.GetSenderShardID() == shardId) || |
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.
could have used a bool var. Useless parenthesis
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.
👍
_, err := tep.txProcessor.ProcessTransaction(tx) | ||
return err | ||
} | ||
|
||
// GetTransactions will return the cached transactions | ||
func (tep *txExecutionProcessor) GetTransactions() []data.TransactionHandler { |
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.
could have been named: GetExecutedTransactions
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.
👍
DeployInitialScTxs: make([]data.TransactionHandler, 0), | ||
} | ||
|
||
return metaHdr, make([][]byte, 0), indexingData, nil |
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.
so we do not index the resulted transactions after a hardfork
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.
Not in this PR, as it is difficult to test at this moment.
There is some work to be done on the hardfork, but we could add a TODO
genesis/parsing/accountsParser.go
Outdated
pubkeyConverter core.PubkeyConverter | ||
keyGenerator crypto.KeyGenerator | ||
hasher hashing.Hasher | ||
marshalizer marshal.Marshalizer | ||
} | ||
|
||
// NewAccountsParser creates a new decoded accounts genesis structure from json config file | ||
func NewAccountsParser( | ||
genesisFilePath 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.
could have switched to an argument DTO
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.
Done
…s-indexing Fixes after review - genesis indexing
…-genesis-txs Merge dev into feat index genesis txs
…twork/elrond-go into feat/index-genesis-transactions
Fix genesis enable epochs
233fd10
…twork/elrond-go into feat/index-genesis-transactions
…-genesis-txs Merge dev into feat index genesis txs
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.
System tests passed.
Index genesis transactions and miniblocks: