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/RelayedV3 #5741

Merged
merged 140 commits into from
Jul 19, 2024
Merged

Feat/RelayedV3 #5741

merged 140 commits into from
Jul 19, 2024

Conversation

sstanculeanu
Copy link
Collaborator

@sstanculeanu sstanculeanu commented Nov 27, 2023

Reasoning behind the pull request

  • Relayed tx v3
  • Fix base cost of user tx for all relayed transactions
  • Only consume move balance cost of user tx in case of relayed move balance

Proposed changes

  • Implemented relayed tx v3. Added a new field on the tx, InnerTransactions that can hold a configurable max number of relayed user transactions (currently set to 50 max).
  • Fixed base cost of relayed tx for all types. Ex: let's consider a relayed v1 tx, with a move balance as user tx, having len of data 200. Considering we would have passed the fixed gas limit, it should be: 50.000 for user move balance + 50.000 for relayed tx + 300.000 for len of data. So total of 400.000. But, due to the way it was computed, it would have cost less than that (350.000 for relayed tx + 500 considered the processing cost). After this fix, this tx should consume exactly 400.000. Also applies for sc calls, where the base cost was omitted.
  • Now when a move balance is detected as a user tx, only the cost of move balance is removed from relayer, no matter how much extra gas is provided.

Testing procedure

  • standard system test
  • test relayed v1 and relayed v2 fees for all kind of transactions(failure/refund scenarios to be verified as well). Make sure the fees consumed by the same transaction are different before and after the fix. After fix, all of them should consume more gas as described above.
  • test relayed v3 transaction execution + fees consumed + events generated for all user txs, in respect with the confluence specs

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

…into feat/relayedv3

# Conflicts:
#	api/groups/transactionGroup.go
#	cmd/node/config/enableEpochs.toml
#	common/enablers/enableEpochsHandler.go
#	common/enablers/enableEpochsHandler_test.go
#	common/enablers/epochFlags.go
#	common/interface.go
#	config/epochConfig.go
#	config/tomlConfig_test.go
#	go.mod
#	go.sum
#	integrationTests/multiShard/relayedTx/relayedTx_test.go
#	integrationTests/vm/txsFee/relayedScDeploy_test.go
#	node/node.go
#	process/errors.go
#	process/transaction/shardProcess_test.go
#	testscommon/enableEpochsHandlerMock/enableEpochsHandlerStub.go
sstanculeanu and others added 15 commits July 4, 2024 11:40
…elayedv3_2024.07.04

Merge rc 17next1 into feat relayedv3 2024.07.04
…nner

Added more integration tests for non-executable inner tx + small fix on logs append
Change receivers ids relayed v3 and multi transfer integration
…n-go into feat/relayedv3

# Conflicts:
#	go.mod
#	go.sum
…layedv3_2024.07.18

Merge rc17next1 into feat relayedv3 2024.07.18
…n-go into feat/relayedv3

# Conflicts:
#	cmd/node/config/enableEpochs.toml
#	common/constants.go
#	common/enablers/enableEpochsHandler.go
#	config/epochConfig.go
…layedv3_2024.07.19

Merge rc17next1 into feat relayedv3 2024.07.19
AdoAdoAdo
AdoAdoAdo previously approved these changes Jul 19, 2024
miiu96
miiu96 previously approved these changes Jul 19, 2024
@elvisboghiu elvisboghiu requested review from elvisboghiu and removed request for elvisboghiu July 19, 2024 09:25
elvisboghiu
elvisboghiu previously approved these changes Jul 19, 2024
Copy link
Contributor

@elvisboghiu elvisboghiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System Test is finished.
The nodes were closed when they gave each of the errors.

`Normal allin test: v1.7.13-dev-config-aebb55e8e0 -> feat\relayedv3

--- Specific errors ---

block hash does not match 2095
wrong nonce in block 975
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 1
receipts hash missmatch 1

/------/

--- Statistics ---

Nr. of all ERRORS: 4
Nr. of all WARNS: 1038
Nr. of new ERRORS: 3
Nr. of new WARNS: 6
Nr. of PANICS: 0

/------/

--- ERRORS ---

ovh-p04-observer-3 :
Error: error calling SaveAccounts, will retry driver = *host.hostDriver retrial in = error = connection not open while sending data on route for topic SaveAccounts 3

/------/

--- WARNINGS ---

ovh-p04-observer-3 :
Warn: wt.Listen()-> connection problem error = connection not open 5
Warn: outport.monitorCompletionOnDriver took too long function = saveAccountsBlocking driver = *host.hostDriver message counter = time = 1`

@sstanculeanu sstanculeanu dismissed stale reviews from elvisboghiu, miiu96, and AdoAdoAdo via 599170a July 19, 2024 09:59
@sstanculeanu sstanculeanu merged commit 215571b into rc/v1.7.next1 Jul 19, 2024
8 checks passed
@sstanculeanu sstanculeanu deleted the feat/relayedv3 branch July 19, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants