Rename everything from newcoin to ripple except the protocol buffers.

This commit is contained in:
Arthur Britto
2012-10-12 15:48:33 -07:00
parent 237ff73916
commit 2af15db40a
23 changed files with 56 additions and 56 deletions

4
.gitignore vendored
View File

@@ -15,8 +15,8 @@
# Ignore object files.
*.o
obj/*
bin/newcoind
newcoind
bin/rippled
rippled
# Ignore locally installed node_modules
node_modules

View File

@@ -83,7 +83,7 @@ WEBSOCKETPP_SRCS = [
]
NEWCOIN_SRCS = glob.glob('src/*.cpp')
PROTO_SRCS = env.Protoc([], 'src/newcoin.proto', PROTOCOUTDIR='obj', PROTOCPYTHONOUTDIR=None)
PROTO_SRCS = env.Protoc([], 'src/ripple.proto', PROTOCOUTDIR='obj', PROTOCPYTHONOUTDIR=None)
env.Clean(PROTO_SRCS, 'site_scons/site_tools/protoc.pyc')
@@ -103,9 +103,9 @@ for file in NEWCOIN_SRCS:
NEWCOIN_OBJS += PROTO_SRCS
newcoind = env.Program('newcoind', NEWCOIN_OBJS)
rippled = env.Program('rippled', NEWCOIN_OBJS)
tags = env.CTags('obj/tags', NEWCOIN_SRCS)
Default(newcoind, tags)
Default(rippled, tags)

View File

@@ -1,5 +1,5 @@
#
# Sample newcoin.txt
# Sample ripple.txt
#
# Publishing this file allows a site to declare in a trustworthy manor that
# their node_public_key is the authorized signature for the domain. This does
@@ -8,9 +8,9 @@
#
# This file is stored on the web server for a domain. This file is searched
# for in the following order:
# - https://newcoin.DOMAIN/newcoin.txt
# - https://www.DOMAIN/newcoin.txt
# - https://DOMAIN/newcoin.txt
# - https://ripple.DOMAIN/ripple.txt
# - https://www.DOMAIN/ripple.txt
# - https://DOMAIN/ripple.txt
#
# This file is UTF-8 with Dos, UNIX, or Mac style end of lines.
# Blank lines and lines beginning with '#' are ignored.
@@ -18,20 +18,20 @@
# No escapes are currently defined.
#
# [validation_public_key]:
# Mandatory in "newcoin.txt".
# Only valid in "newcoin.txt".
# Mandatory in "ripple.txt".
# Only valid in "ripple.txt".
#
# Example: n9MZTnHe5D5Q2cgE8oV2usFwRqhUvEA8MwP5Mu1XVD6TxmssPRev
#
# [domain]:
# Mandatory in "newcoin.txt".
# Only valid in "newcoin.txt".
# Mandatory in "ripple.txt".
# Only valid in "ripple.txt".
# Must match location of file.
#
# Example: google.com
#
# [ips]:
# Only valid in "newcoind.cfg", "newcoin.txt", and the referered [ips_url].
# Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
# List of ips where the Newcoin protocol is avialable.
# One ipv4 or ipv6 address per line.
# A port may optionally be specified after adding a space to the address.
@@ -43,11 +43,11 @@
# 2001:0db8:0100:f101:0210:a4ff:fee3:9566
#
# [validators]:
# Only valid in "newcoind.cfg", "newcoin.txt", and the referered [validators_url].
# Only valid in "rippled.cfg", "ripple.txt", and the referered [validators_url].
# List of Newcoin validators this node recommends.
#
# For domains, newcoind will probe for https web servers at the specied
# domain in the following order: newcoin.DOMAIN, www.DOMAIN, DOMAIN
# For domains, rippled will probe for https web servers at the specied
# domain in the following order: ripple.DOMAIN, www.DOMAIN, DOMAIN
#
# Examples:
# redstem.com
@@ -55,16 +55,16 @@
# n9MqiExBcoG19UXwoLjBJnhsxEhAZMuWwJDRdkyDz1EkEkwzQTNt John Doe
#
# [ips_url]:
# Only valid in "newcoin.txt".
# Only valid in "ripple.txt".
# https URL to a similarily formatted file containing [ips].
#
# Example: https://google.com/newcoin_ips.txt
# Example: https://google.com/ripple_ips.txt
#
# [validators_url]:
# Only valid in "newcoin.txt".
# Only valid in "ripple.txt".
# https URL to a similarily formatted file containing [validators].
#
# Example: https://google.com/newcoin_validators.txt
# Example: https://google.com/ripple_validators.txt
#
# [currencies]:
# This section allows a site to declare currencies it currently issues.

View File

@@ -9,7 +9,7 @@
#include <string>
#include <boost/filesystem.hpp>
#define SYSTEM_NAME "newcoin"
#define SYSTEM_NAME "ripple"
#define SYSTEM_CURRENCY_CODE "XNS"
#define SYSTEM_CURRENCY_PRECISION 6
#define SYSTEM_CURRENCY_CODE_RIPPLE "XNR"
@@ -19,7 +19,7 @@
#define SYSTEM_CURRENCY_PARTS 1000000ull // 10^SYSTEM_CURRENCY_PRECISION
#define SYSTEM_CURRENCY_START (SYSTEM_CURRENCY_GIFT*SYSTEM_CURRENCY_USERS*SYSTEM_CURRENCY_PARTS)
#define CONFIG_FILE_NAME SYSTEM_NAME "d.cfg" // newcoind.cfg
#define CONFIG_FILE_NAME SYSTEM_NAME "d.cfg" // rippled.cfg
#define DEFAULT_VALIDATORS_SITE "redstem.com"
#define VALIDATORS_FILE_NAME "validators.txt"
@@ -52,9 +52,9 @@ public:
boost::filesystem::path UNL_DEFAULT;
std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet.
std::vector<std::string> VALIDATORS; // Validators from newcoind.cfg.
std::vector<std::string> IPS; // Peer IPs from newcoind.cfg.
std::vector<std::string> SNTP_SERVERS; // SNTP servers from newcoind.cfg.
std::vector<std::string> VALIDATORS; // Validators from rippled.cfg.
std::vector<std::string> IPS; // Peer IPs from rippled.cfg.
std::vector<std::string> SNTP_SERVERS; // SNTP servers from rippled.cfg.
enum StartUpType { FRESH, NORMAL, LOAD, NETWORK };
StartUpType START_UP;

View File

@@ -140,7 +140,7 @@ const char *WalletDBInit[] = {
"CREATE INDEX SeedDomainNext ON SeedDomains (Next);",
// Table of PublicKeys user has asked to trust.
// Fetches are made to the CAS. This gets the newcoin.txt so even validators without a web server can publish a newcoin.txt.
// Fetches are made to the CAS. This gets the ripple.txt so even validators without a web server can publish a ripple.txt.
// Source:
// 'M' = Manually added. : 1500
// 'V' = validators.txt : 1000
@@ -189,7 +189,7 @@ const char *WalletDBInit[] = {
// Entry:
// Entry index in [validators] table.
// Referral:
// This is the form provided by the newcoin.txt:
// This is the form provided by the ripple.txt:
// - Public key for CAS based referral.
// - Domain for domain based referral.
// XXX Do garbage collection when validators have no references.
@@ -200,7 +200,7 @@ const char *WalletDBInit[] = {
PRIMARY KEY (Validator,Entry) \
);",
// List of referrals from newcoin.txt files.
// List of referrals from ripple.txt files.
// Validator:
// Public key of referree.
// Entry:

View File

@@ -115,7 +115,7 @@ EC_KEY* CKey::GenerateRootDeterministicKey(const uint128& seed)
return pkey;
}
// Take newcoin address.
// Take ripple address.
// --> root public generator (consumes)
// <-- root public generator in EC format
EC_KEY* CKey::GenerateRootPubKey(BIGNUM* pubGenerator)

View File

@@ -10,7 +10,7 @@
#include "Application.h"
#include "Ledger.h"
#include "utils.h"
#include "../obj/src/newcoin.pb.h"
#include "../obj/src/ripple.pb.h"
#include "PackedMessage.h"
#include "Config.h"
#include "BitcoinUtil.h"

View File

@@ -14,7 +14,7 @@
#include "Ledger.h"
#include "Peer.h"
#include "TaggedCache.h"
#include "../obj/src/newcoin.pb.h"
#include "../obj/src/ripple.pb.h"
class PeerSet
{

View File

@@ -808,7 +808,7 @@ NewcoinAddress NewcoinAddress::createSeedGeneric(const std::string& strText)
return naNew;
}
BOOST_AUTO_TEST_SUITE(newcoin_address)
BOOST_AUTO_TEST_SUITE(ripple_address)
BOOST_AUTO_TEST_CASE( check_crypto )
{

View File

@@ -14,7 +14,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <boost/cstdint.hpp>
#include "../obj/src/newcoin.pb.h"
#include "../obj/src/ripple.pb.h"
// The header size for packed messages
// len(4)+type(2)

View File

@@ -7,7 +7,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include "../obj/src/newcoin.pb.h"
#include "../obj/src/ripple.pb.h"
#include "PackedMessage.h"
#include "Ledger.h"
#include "Transaction.h"

View File

@@ -2555,7 +2555,7 @@ Json::Value RPCServer::doUnlLoad(const Json::Value& params)
return "loading";
}
// Populate the UNL from newcoin.org's validators.txt file.
// Populate the UNL from ripple.com's validators.txt file.
Json::Value RPCServer::doUnlNetwork(const Json::Value& params)
{
theApp->getUNL().nodeNetwork();

View File

@@ -1093,7 +1093,7 @@ std::auto_ptr<STObject> STObject::parseJson(const Json::Value& object, SField::r
data.push_back(new STAccount(field, v));
}
else
{ // newcoin addres
{ // ripple address
NewcoinAddress a;
if (!a.setAccountID(strValue))
{

View File

@@ -11,7 +11,7 @@
#include "key.h"
#include "uint256.h"
#include "../obj/src/newcoin.pb.h"
#include "../obj/src/ripple.pb.h"
#include "Serializer.h"
#include "SHAMap.h"
#include "SerializedTransaction.h"

View File

@@ -816,7 +816,7 @@ void UniqueNodeList::getIpsUrl(const NewcoinAddress& naNodePublic, section secSi
}
}
// After fetching a newcoin.txt from a web site, given a section with validators, parse and persist it.
// After fetching a ripple.txt from a web site, given a section with validators, parse and persist it.
void UniqueNodeList::responseValidators(const std::string& strValidatorsUrl, const NewcoinAddress& naNodePublic, section secSite, const std::string& strSite, const boost::system::error_code& err, const std::string& strValidatorsFile)
{
if (!err)
@@ -855,7 +855,7 @@ void UniqueNodeList::getValidatorsUrl(const NewcoinAddress& naNodePublic, sectio
}
}
// Process a newcoin.txt.
// Process a ripple.txt.
void UniqueNodeList::processFile(const std::string& strDomain, const NewcoinAddress& naNodePublic, section secSite)
{
//
@@ -882,7 +882,7 @@ void UniqueNodeList::processFile(const std::string& strDomain, const NewcoinAddr
getValidatorsUrl(naNodePublic, secSite);
}
// Given a newcoin.txt, process it.
// Given a ripple.txt, process it.
void UniqueNodeList::responseFetch(const std::string& strDomain, const boost::system::error_code& err, const std::string& strSiteFile)
{
section secSite = ParseSection(strSiteFile, true);
@@ -1002,7 +1002,7 @@ void UniqueNodeList::responseFetch(const std::string& strDomain, const boost::sy
}
}
// Get the newcoin.txt and process it.
// Get the ripple.txt and process it.
void UniqueNodeList::fetchProcess(std::string strDomain)
{
std::cerr << "Fetching '" NODE_FILE_NAME "' from '" << strDomain << "'." << std::endl;
@@ -1035,7 +1035,7 @@ void UniqueNodeList::fetchTimerHandler(const boost::system::error_code& err)
}
}
// Try to process the next fetch of a newcoin.txt.
// Try to process the next fetch of a ripple.txt.
void UniqueNodeList::fetchNext()
{
bool bFull;
@@ -1238,7 +1238,7 @@ void UniqueNodeList::setSeedDomains(const seedDomain& sdSource, bool bNext)
}
}
// Queue a domain for a single attempt fetch a newcoin.txt.
// Queue a domain for a single attempt fetch a ripple.txt.
// --> strComment: only used on vsManual
// YYY As a lot of these may happen at once, would be nice to wrap multiple calls in a transaction.
void UniqueNodeList::nodeAddDomain(std::string strDomain, validatorSource vsWhy, const std::string& strComment)
@@ -1592,7 +1592,7 @@ void UniqueNodeList::nodeBootstrap()
bLoaded = nodeLoad(VALIDATORS_FILE_NAME);
}
// Always load from newcoind.cfg
// Always load from rippled.cfg
if (!theConfig.VALIDATORS.empty())
{
NewcoinAddress naInvalid; // Don't want a referrer on added entries.

View File

@@ -32,7 +32,7 @@ class UniqueNodeList
{
public:
typedef enum {
vsConfig = 'C', // newcoind.cfg
vsConfig = 'C', // rippled.cfg
vsInbound = 'I',
vsManual = 'M',
vsReferral = 'R',

View File

@@ -7,7 +7,7 @@
#define SERVER_VERSION_MAJOR 0
#define SERVER_VERSION_MINOR 7
#define SERVER_VERSION_SUB "-a"
#define SERVER_NAME "NewCoin"
#define SERVER_NAME "Ripple"
#define SV_STRINGIZE(x) SV_STRINGIZE2(x)
#define SV_STRINGIZE2(x) #x

View File

@@ -33,7 +33,7 @@ bool init_unit_test()
void printHelp(const po::options_description& desc)
{
cout << "newcoin [options] <command> <params>" << endl;
cout << SYSTEM_NAME "d [options] <command> <params>" << endl;
cout << desc << endl;

View File

@@ -5,7 +5,7 @@
var path = require("path");
// Where to find the binary.
exports.newcoind = path.join(process.cwd(), "newcoind");
exports.rippled = path.join(process.cwd(), "rippled");
// Configuration for servers.
exports.servers = {

View File

@@ -23,7 +23,7 @@ var Server = function(name) {
this.name = name;
};
// Return a server's newcoind.cfg as string.
// Return a server's rippled.cfg as string.
Server.prototype.configContent = function() {
var cfg = config.servers[this.name];
@@ -37,10 +37,10 @@ Server.prototype.serverPath = function() {
};
Server.prototype.configPath = function() {
return path.join(this.serverPath(), "newcoind.cfg");
return path.join(this.serverPath(), "rippled.cfg");
};
// Write a server's newcoind.cfg.
// Write a server's rippled.cfg.
Server.prototype.writeConfig = function(done) {
fs.writeFile(this.configPath(), this.configContent(), 'utf8', done);
};
@@ -49,11 +49,11 @@ Server.prototype.writeConfig = function(done) {
Server.prototype.serverSpawnSync = function() {
// Spawn in standalone mode for now.
this.child = child.spawn(
config.newcoind,
config.rippled,
[
"-a",
"-v",
"--conf=newcoind.cfg"
"--conf=rippled.cfg"
],
{
cwd: this.serverPath(),
@@ -61,7 +61,7 @@ Server.prototype.serverSpawnSync = function() {
stdio: 'inherit'
});
console.log("server: start %s: %s -a --conf=%s", this.child.pid, config.newcoind, this.configPath());
console.log("server: start %s: %s -a --conf=%s", this.child.pid, config.rippled, this.configPath());
// By default, just log exits.
this.child.on('exit', function(code, signal) {

View File

@@ -12,7 +12,7 @@
# List of nodes to accept as validators specified by public key or domain.
#
# For domains, newcoind will probe for https web servers at the specified
# domain in the following order: newcoin.DOMAIN, www.DOMAIN, DOMAIN
# domain in the following order: ripple.DOMAIN, www.DOMAIN, DOMAIN
#
# Examples: redstem.com
# n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5