Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Allow transactions, when a configured transactionPermissionContract does not exist#8940

Closed
wulfraem wants to merge 3 commits into
openethereum:masterfrom
evannetwork:master
Closed

Allow transactions, when a configured transactionPermissionContract does not exist#8940
wulfraem wants to merge 3 commits into
openethereum:masterfrom
evannetwork:master

Conversation

@wulfraem
Copy link
Copy Markdown

We wanted to use the transactionPermissionContract and deployed a matching contract. Then added the contract to the chain specification. Clients, that already had a synced chain were able to sync, but clients, that performed a full sync, stopped at the first transaction (in our case at block 5), because the configured transactionPermissionContract did not exist at this time. If the contract does not exist, the check defaults to "not permitted" due to an error, when calling the non-existing contract, this pull request checks if the contract exists and defaults to true in such a case.

This fixes our issue, but i guess a useful extension to the transactionPermissionContract logic would be to use a similar config format like the Multi-Set Validator-Set and define starting blocks for valid permission contracts. This would allow to change the contracts and still be able to sync the chain.

…igured 'transactionPermissionContract', that does (not) exist
@parity-cla-bot
Copy link
Copy Markdown

It looks like @wulfraem signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Jun 21, 2018
@5chdn 5chdn added this to the 1.12 milestone Jun 21, 2018
@grbIzl grbIzl self-requested a review June 21, 2018 12:21
Comment thread ethcore/src/tx_filter.rs Outdated
trace!(target: "tx_filter", "transaction permission contract does not exist at current block, permitting transaction");
return true;
} else {
trace!(target: "tx_filter", "transaction permission contract exists at current block, checking permissions");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I suggest removing this trace. It will spam the log

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Makes sense. I removed the logs.

Copy link
Copy Markdown
Contributor

@andresilva andresilva left a comment

Choose a reason for hiding this comment

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

Usually what we do is create a transition flag for the feature that sets at which block the feature is enabled.

@wulfraem
Copy link
Copy Markdown
Author

This pull request was intended to fix the syncing issue, that we had with the current implementation.

In the second part of my initial suggested a config similar to the config of the Multi-Set Validator-Set. This would allow to swap the permission contracts over time without creating multiple transitions for each new contract.

@5chdn 5chdn added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 2, 2018
@5chdn
Copy link
Copy Markdown
Contributor

5chdn commented Jul 2, 2018

I'm not overly familiar with the transaction permissioning, but what @andresilva suggests is that you either have set contract enabled right from the start (would make this PR obsolete) or you want to make it highly configurable by defining some transaction permission contract "transition" logic allowing users to specify at which block which contract is being used.

@5chdn 5chdn added the A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 9, 2018
@5chdn
Copy link
Copy Markdown
Contributor

5chdn commented Jul 9, 2018

Marking as stale, let me know if you have any further questions.

@5chdn 5chdn added the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jul 10, 2018
@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 10, 2018
@5chdn 5chdn removed the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jul 11, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Jul 17, 2018
@andresilva
Copy link
Copy Markdown
Contributor

Replaced by #9275.

@andresilva andresilva closed this Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. M4-core ⛓ Core client code / Rust.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants