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

Rpc Server Reliability Upgrades #619

Merged
merged 5 commits into from
Aug 28, 2018
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
added link to rpc configuration wiki in config file
ali-sharif committed Aug 28, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 36293426f63b4ca79816d0280cc7a6603ff1f5ca
2 changes: 1 addition & 1 deletion modBoot/resource/config.xml
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
<mode>aion</mode>
<id>[NODE-ID-PLACEHOLDER]</id>
<api>
<!-- rpc config docs: https://github.com/aionnetwork/aion/wiki/JSON-RPC-API-Docs -->
<rpc active="true" ip="127.0.0.1" port="8545">
<!--boolean, enable/disable cross origin requests (browser enforced)-->
<cors-enabled>false</cors-enabled>
<!--comma-separated list, APIs available: web3,net,debug,personal,eth,stratum-->
<apis-enabled>web3,eth,personal,stratum,ops</apis-enabled>
6 changes: 4 additions & 2 deletions modMcf/src/org/aion/mcf/config/CfgApiRpc.java
Original file line number Diff line number Diff line change
@@ -206,15 +206,17 @@ String toXML() {

Writer strWriter = new StringWriter();
xmlWriter = output.createXMLStreamWriter(strWriter);

xmlWriter.writeCharacters("\r\n\t\t");
xmlWriter.writeComment("rpc config docs: https://github.com/aionnetwork/aion/wiki/JSON-RPC-API-Docs");

xmlWriter.writeCharacters("\r\n\t\t");
xmlWriter.writeStartElement("rpc");

xmlWriter.writeAttribute("active", this.active ? "true" : "false");
xmlWriter.writeAttribute("ip", this.ip);
xmlWriter.writeAttribute("port", this.port + "");

xmlWriter.writeCharacters("\r\n\t\t\t");
xmlWriter.writeComment("boolean, enable/disable cross origin requests (browser enforced)");
xmlWriter.writeCharacters("\r\n\t\t\t");
xmlWriter.writeStartElement("cors-enabled");
xmlWriter.writeCharacters(String.valueOf(this.isCorsEnabled()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why weren't the other configuration options added here?

Copy link
Contributor Author

@ali-sharif ali-sharif Aug 27, 2018

Choose a reason for hiding this comment

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

As is stated in the RPC docs, the other settings are for advanced users and putting them in the config would just give users opportunity to tweak those settings without really knowing what those settings do.

Copy link
Collaborator

Choose a reason for hiding this comment

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

the advanced config settings for the rpc-server will disappear after executing./aion.sh -c
Is that an expected behavior?